- cX:"+cX+"
- cY:"+cY;
cCnt = 0;
for (i = 0 ; i < cIt ; i++) {
tmpzX = (zX*zX)-(zY*zY)+cX;
tmpzY = ((zX*zY)*2)+cY;
zX = tmpzX;
zY = tmpzY;
if (((zX*zX)+(zY*zY)) > 4 && cCnt == 0) {cCnt = i;i=cIt}
}
if (cCnt == 0) {
ctx.strokeStyle = "rgb( 0, 0, 0 )";
} else {
//ctx.strokeStyle = "rgb( "+(255-255*(cCnt/cIt))+", 0, 255 )";
ctx.strokeStyle = "rgb( "+(255-((cCnt*10)%255))+", 0, 0 )";
}
ctx.strokeRect( iX, iY, 1,1);
/*
ctx.beginPath();
ctx.moveTo(iX, iY);
ctx.lineTo(iX+1, iY+1);
ctx.stroke();
*/
debug.innerHTML+="
- cCnt:"+cCnt+"
- compX:"+cX+"
- compY:"+cY+"
- ABS:"+(cX+cY);
}
iY++;
if (iY == iMaxY-iBord-1) {
ctx.font = "30px Arial";
ctx.fillStyle = "rgb( 255, 0, 0 )";
//ctx.fillText("Mandelbrot Done", 200, 300);
clearInterval(myVar)
}
}