mandelbrot method

Van Rooy, Russell RVanRooy at filenet.com
Fri Feb 6 21:20:11 UTC 1998


Hi to all good squeak-people out there . I have a mandelbrot method with
which I am making no progress at all. I translated it into smalltalk
from its original basic . The basic program was from the book Chaos,
Fractals, and Dynamics : Computer Experiments in Mathematics
/ISBN=020123288X/3571-4640386-848577 by Robert L. Devaney / Paperback /
Published 1989 .  Here is my method:

| c1 c2 x y x1 y1 r |
1 to: 300 do: [ :i |
	1 to: 150 do: [ :j |
		c1 := -2 + ((4*i)/300).
			  c2 := 2 - ((4*j)/300).
			  x :=c1. 
			  y :=c2.
				1 to: 30 do: [ :n |
					x1 :=(x*x)-(y*y)+c1.
				 	y1 :=(2*x*y)+c2.
				 	r :=(x1*x1)+(y1*y1).
			     (r < 4)
					ifTrue: [
						 x=x1.
				 		 y=y1.
			
				self go: i @ j.
				self goto: i @ (300-j).].
							
				]
			]
		]

Can someone out there help me to get this method (of the Pen class) to
actually  graphically print out a Mandelbrot set ?  What it does at this
point is print out an elliptical blob but definitely not an M-set.

thanks,
Russ 
( a beginner for life squeaker  )
				
	





More information about the Squeak-dev mailing list