4. for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {
double c_re = (col - width/2)*4.0/width;
double c_im = (row - height/2)*4.0/width;
double x = 0, y = 0;
double r2;
int iter = 0;
while (x*x+y*y < 4 && iter < max) {
double x_new = x*x-y*y+c_re;
y = 2*x*y+c_im;
x = x_new;
iter++;
}
if (iter < max) pixel(col, row, colors[iter]);
else pixel(col, row, black);
}
}
http://jonisalonen.com/2013/lets-draw-the-mandelbrot-set/
5. https://www.cs.auckland.ac.nz/ chaitin/inv.html
“So I’ve done that using LISP because LISP is simple
enough, LISP is in the intersection between theoretical
and practical programming. Lambda calculus is even
simpler and more elegant than LISP, but it’s unusable.”
– An Invitation to Algorithmic Information Theory
Gregory Chaitin