I have problems using the smoot coloring algorithm. I just don't get them implemented in my Code. This is the main code which causes an error after some calculated pixel rows:
g:=StrToInt(Edit3.Text); //maximum iteration count
for x:=0 to Width do
begin
for y:=0 to Height do
begin
zr:=x*(br-ar)/Width+ar;
zi:=y*(bi-ai)/Height+ai;
n:=1;
zr0:=zr;
zi0:=zi;
while (n<g) and (zr*zr+zi*zi<4) do
begin
zrh:=zr;
zr:=zr*zr-zi*zi+zr0;
zi:=zrh*zi+zi*zrh+zi0;
Inc(n) //iterations
end;
n:=Round(n+1-(log2(log2(sqrt(zr*zr+zi*zi))/log2(4)))); //<-- this should smoothen the iterations
Draw_Pixels(n,g,x,y,Image1.Canvas)
end
end;
end;
Henry