Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to perform Simple Zoom into Mandelbrot Set
    text
    copied!<p>I have a general question with the Mandelbrot set "zoom" view and the math pertaining to it. I have implemented the mandelbrot set for the 256 X 256 window size with values </p> <pre><code> // ImageWidth = ImageHeight = 256; double MinRe = -2.0; double MaxRe = 1.0; double MinIm = -1.2; double MaxIm = 1.8; ComputeMandelbrot(); </code></pre> <p>Next, I select a region of square and these are the coordinates for the upper left most tip (76,55), and rightmost bottom tip (116, 99) <strong><em>(square of side 44 is chosen)</em></strong></p> <p>so , I choose <code>x2 = x1 + 44 ; y2 = y1 + 44;</code></p> <p>How do I translate these new coordinates to the complex plane ? and how would the new real and imaginary values change in order to compute it for the new set of values ?</p> <p>This is what I have tried so far..</p> <pre><code>double Re_factor = (MaxRe-MinRe)/(ImageWidth-1); double Im_factor = (MaxIm-MinIm)/(ImageHeight-1); double newMinRe = MinRe + (Re_factor* x1); double newMaxRe = MaxRe + (Re_factor* x2); double newMinIm = MinIm + (Im_factor* y1); double newMaxIm = MaxIm + (Im_factor* y2); // and then I compute c - real and c- imag values for(unsigned y=0; y&lt;ImageHeight; ++y) { double c_im = newMaxIm - y*Im_factor; for(unsigned x=0; x&lt;ImageWidth; ++x) { double c_re = newMinRe + x*Re_factor; // ComputeMandelbrot(); } } </code></pre> <p>I am having a hard time figuring out the math, and also with regards to generating a 'zoom' view and any help is appreciated !!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload