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);