Tell me more ×
Code Review Stack Exchange is a question and answer site for peer programmer code reviews. It's 100% free, no registration required.

I read this question and I don't understand the answer. Especially how can I aim for the center of the pixel like so:

  for(unsigned SX = SMin; x < SMax; ++x) {
     double k = (double(SX + 0.5) - SMin) / (SMax - SMin);
     double IX = (k * (IMax - IMin)) + IMin;
  }

I've made an example here: http://www.phpdevpad.de/index.php?id=190 but the I have also problem to find the corner pixel when you want to zoom into the mandelbrot like so:

 double Re_factor = (MaxRe-MinRe)/(ImageWidth-1);
 double Im_factor = (MaxIm-MinIm)/(ImageHeight-1);
 double newMinRe = MinRe + (Re_factor* x1);
 double newMaxRe = MinRe + (Re_factor* x2);
 double newMinIm = MinIm + (Im_factor* y1);
 double newMaxIm = MinIm + (Im_factor* y2);
share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.