Reputation: 1934
what gives one the ability to define how deep the zooming process would be?
what i mean is that i tried earlier to run mandelbrot set with 200 iteration and then compared the results with a 1000 iterations run. the results were kinda surprising because i got the same zooming level.the iterations were constant the entire process and the mandelbrot set was defined with 512X512 pixels constant. what should i change in order to get a deeper zooming level?
thanks!
edit : i would also like to mention that from nice looking picture, after i get to the 2nd-3rd level of mandelbrot the entire set is viewed as a giant pixel. why is that?
2d edit : after an extensive research i've just noticed that what makes the entire set to look like a big pixel is because all points get same iterations count,in my case they are all 60...
Upvotes: 0
Views: 437
Reputation: 7449
This may be too abstract, or too concrete, or incomprehensible. Like I said in the comment, it would be easier to discuss with your code at hand.
If you mean what I think you mean by zooming, you'd change the boundaries of c
(in the formula z[n+1] = z[n]^2 + c
).
To explain, the full Mandelbrot set is contained within a circle with radius 2 around a center [0;0]
. The c
in the formula is a complex number, i.e. [r;i]
(real;imaginary), which, on the computer screen, corresponds to x
and y
.
In other words, if we place that radius 2 circle so that it is exactly contained within our image, then [-2;2]
will be the upper left corner of our image, and [2;-2]
is the lower right corner.
We then take each point of our image, calculate what its pixel coordinates [x;y]
correspond to in terms of the smaller, "actual" coordinate system [r;i]
. Then we have our c
and can send it through our iterations.
So, to "zoom", you'd pick other boundaries [r;i]
than the full [-2;2]
,[2:-2]
, e.g. [-1;1]
,[1:-1]
.
With 512x512 pixels, and an "actual" coordinate system that's now 2 by 2, that would mean each pixel corresponds to 2/512 units of the "actual" coordinate system. So your first r
value would be -1, the next would be -1 + 2/512 = -0.99609375
etc.
The number of iterations only decide how accurate your rendering will be. Generally, the further you "zoom" in, the more accurate they'll need to be, so the more iterations you'll need in order to capture the details.
Upvotes: 2