title: how to zoom mandelbrot set
body: <p>I have successfully implemented the mandelbrot set as described in the wikipedia article, but I do not know how to zoom into a specific section. This is the code I am using:</p>
  
  <pre><code>+(void)createSetWithWidth:(int)width Height:(int)height Thing:(void(^)(int, int, int, int))thing
  {   
      for (int i = 0; i &lt; height; ++i)
      for (int j = 0; j &lt; width; ++j)
      {
          double x0 = ((4.0f * (i - (height / 2))) / (height)) - 0.0f;
          double y0 = ((4.0f * (j - (width / 2))) / (width)) + 0.0f;
          double x = 0.0f;
          double y = 0.0f;
  
          int iteration = 0;
          int max_iteration = 15;
  
          while ((((x * x) + (y * y)) &lt;= 4.0f) &amp;&amp; (iteration &lt; max_iteration))
          {
              double xtemp = ((x * x) - (y * y)) + x0;
              y = ((2.0f * x) * y) + y0;
              x = xtemp;
              iteration += 1;
          }
  
          thing(j, i, iteration, max_iteration);
      }
  }
  </code></pre>
  
  <p>It was my understanding that x0 should be in the range -2.5 - 1 and y0 should be in the range -1 - 1, and that reducing that number would zoom, but that didnt really work at all. How can I zoom?</p>