Computer Science Canada Fractal Generator |
Author: | s_climax [ Sun May 09, 2004 4:15 pm ] | ||
Post subject: | Fractal Generator | ||
Please ignore the names of the vars. If you uncomment the last 3 drawing things it looks cooler, but I'm not sure if its still a fractal.
|
Author: | guruguru [ Sun May 09, 2004 4:44 pm ] |
Post subject: | |
Geez, how'd you think of that? That is pretty freakin awsome. I personally like the first way but wow thats nice. |
Author: | s_climax [ Sun May 09, 2004 5:16 pm ] | ||
Post subject: | |||
This one is much better. This is the mandelbrot fractal.
|
Author: | Delos [ Sun May 09, 2004 7:39 pm ] |
Post subject: | |
Now that one I like ![]() |
Author: | s_climax [ Sun May 09, 2004 10:07 pm ] |
Post subject: | |
Yep the second one is MUCH better for a couple reasons. First it uses colour, second it does not just draw random dots like the other one. It also looks a lot cooler when its done. |
Author: | Paul [ Mon May 10, 2004 4:01 pm ] |
Post subject: | |
Can anyone explain to me what the significance of fractals and the code used to make it? |
Author: | Delos [ Mon May 10, 2004 6:40 pm ] |
Post subject: | |
Recursion. Big time. (Or so I'm told). Plus, pretty pictures! |
Author: | Catalyst [ Mon May 10, 2004 9:32 pm ] | ||||
Post subject: | |||||
to generate these fractals u treat each point on the screen as a point on the complex plane where x is the real component and y is imaginary component in the form
then for each point iterate through a formula, for Mandlebrot and Julia Sets it is
where both z and c are complex numbers . For the Julia Set c is constant (different c values produce different images), for the Mandlebrot Set c is equal to x+yi. The initial z value for both sets is x+yi (but 0+0i also works for mandlebrot) Each time the equation is iterated the distance from the origin is checked (the imaginary and real components are treated as x,y) if it passes a certain distance (usually 2 or 4) then it is not part of the set. If it the maximum number of iterations (cant iterate forever) is reached and the point is still inside the distance it is considered part of the set (> max # of iterations, >accuratcy of fractal) Those pretty colors are usually derived from how many iterations it took to escape ( i.e. numIterations/maxIterations*someThing) Fractals are very important as they provide infinite complexity with fairly simple rules and the result varies wildly depending on small changes in the intial input (Fractals are also related to chaos theory) |
Author: | s_climax [ Mon May 10, 2004 9:44 pm ] |
Post subject: | |
Well said. |
Author: | Delos [ Tue May 11, 2004 6:34 pm ] |
Post subject: | |
It-e-rate. Irritate? Iternis? Intermediate? Definition not found. Please define this term. |
Author: | Mazer [ Tue May 11, 2004 6:46 pm ] |
Post subject: | |
Where did you look? http://www.hyperdictionary.com/search.aspx?define=iterate&sourceid=Mozilla-search |
Author: | Delos [ Tue May 11, 2004 9:11 pm ] |
Post subject: | |
In my memory banks...apparently my vocab has...er...smalled itself. |