Advertisement

Fractals

Started by April 20, 2002 10:28 AM
10 comments, last by koji187 22 years, 9 months ago
Jesper & aperson

u both helped me alot, i thank you.

anyways both methods were good but that site did explain some stuff.
the sqrt thing and number of loops, these things are simple to spot cause im good at math and coding

once again thanks
for real-time rendering of mandelbrot, you may wish to look into recursive square drawing. Its simple, and works on mandelbrot''s and julia sets.

Divide the current selection into 4 squares, find the most interesting square, and divide it into 4 squares. Then, look at every square again, and figure out which is the most interesting, and divide it into 4 squares. Keep doing this untill a certain amount of squares, or a certain amount of time has passed, and then draw all the squares.

You may want to divide the whole thing into 16 squares before you even start, or have a minimum amount of divisions, just to make sure nothing interesting is there ^^.

Make sure you are not dividing the squares past the relative size of a pixel, as this can happen in interesting parts of the mandelbrot sets. I turned it off once and found my squares being divided to the limits of decimals.

For drawing the squares, just get the average iteration escape for their corners, and draw that. Or, to speed things up, if you know that you have no more significant squares left, just draw it based on one of its corners. However, you can get around this by the fact that you had to get the differences anyways so you could store them in each square as you go along and simply draw the draw that.

This algorithm isn''t perfect, but it is very fast if you do it right. Its good for real time rendering, but if you dont do it right... it can be fatally ugly looking.

Good luck! ^^. .sen
"I want to make a simple MMORPG first" - Fenryl

This topic is closed to new replies.

Advertisement