#declare MinRe=-2; #declare MaxRe=1; #declare MinIm=-1; #declare MaxIm=1; #declare Iter=20; #declare XSize=3; #declare ZSize=2; #declare ReRes=80; #declare ImRes=80; #declare Radius=.03; #declare Height=.5; #declare Color=<1,1,0>; camera { location <-3,3,-3> look_at 0 angle 35 } light_source { <10,100,-30> color 1 } //--------------------------------- #declare Im=MinIm; #declare PosZ=-ZSize/2; #while (PosZ<=ZSize/2) #declare Re=MinRe; #declare PosX=-XSize/2; #while (PosX<=XSize/2) #declare Zr=Re; #declare Zi=Im; #declare bri=1; #declare n=Iter; #while (n>0) #declare Zr2=Zr*Zr; #declare Zi2=Zi*Zi; #if (Zr2+Zi2>4) #declare bri=sqrt(1-(n-1)/Iter); #declare n=0; #else #declare Zi=2*Zr*Zi+Im; #declare Zr=Zr2-Zi2+Re; #declare n=n-1; #end #end sphere { <PosX,Height*bri,PosZ>,Radius pigment { rgb Color*bri } } #declare Re=Re+(MaxRe-MinRe)/ReRes; #declare PosX=PosX+XSize/ReRes; #end #declare Im=Im+(MaxIm-MinIm)/ImRes; #declare PosZ=PosZ+ZSize/ImRes; #end