Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!reed!reeder From: reeder@reed.UUCP (Doug Reeder) Newsgroups: comp.sys.apple Subject: Re: AE, Mandelbrot generator Summary: points not in the set are not set false Message-ID: <14105@reed.UUCP> Date: 9 Feb 90 05:22:17 GMT References: <9002071850.AA29665@en.ecn.purdue.edu> Reply-To: reeder@reed.UUCP (Doug Reeder) Organization: Institute of Knowledge, Jinx Lines: 26 In article <9002071850.AA29665@en.ecn.purdue.edu> eldorado@EN.ECN.PURDUE.EDU (David D Jansen) writes: >Could someone with fractal experience tell me why I get weird data. It gets >the basic shape but not quite right. A friend of mine (a fractal "guru") >can't make out what the problem. > if (((z.a * z.a) + (z.b * z.b)) <= 4) then > pages.bitmap[h,v]:=true Nowhere do you initialize the bitmap to false, and Pascal does not initialize your variables for you, so the value of any given point is undefined when you start. The simplest way to fix this is to add: else pages.bitmap[h,v]:=false > end; > writeln (v/ver*100:5:2,'% done'); etc. Some pascal compilers will initialize your variables for you, but don't depend on it. -- Doug Reeder USENET: ...!tektronix!reed!reeder from ARPA: tektronix!reed!reeder@berkeley.EDU BITNET: reeder@reed.BITNET the Little Mermaid on materialism: I just don't see how a world that makes such wonderful things ... could be bad!