SET MODE "color" SET WINDOW 0,785,0,565 SET BACKGROUND COLOR "white" LET x=0 LET y=0 LET a=0 LET b =0 LET s1=310/2. LET s2 =s1*565/785 RANDOMIZE PRINT"five point attractors I.F.S." PRINT"BY R.L.BAGULA 19 June 1998 ©" FOR n= 1 TO 2000000 LET a =RND IF mod(n,5)>0 then LET r=-sqr(5) ELSE LET r=sqr(5) END IF LET x2=x1 LET y2=y1 LET p=int(1-2*rnd) IF a <= 1/5 THEN LET x1=x/r-((1+sqr(5))/2+p ) LET y1=y/r END IF IF a<= 2/5 AND a>1/5 THEN LET x1=-x/r -(1+sqr(5))/2 LET y1=-y/r END IF IF a<= 3/5 AND a>2/5 THEN LET x1=-x/r -((1+sqr(5))/2-1) LET y1=-y/r END IF IF a<= 4/5 AND a>3/5 THEN LET x1=y/r LET y1=x/r +1 END IF IF a<= 1 AND a>4/5 THEN LET x1=-y/r LET y1=-x/r -1 END IF LET x0=x LET y0=y LET x=x1 LET y=y1 LET r=sqr(x*x+y*y) LET r0=sqr(x0*x0+y0*y0) REM approximate second derivative Laplacian REM Kigami/ Lapidus :d^2u/dz^2=-k*u LET xu= (x-2*x0+x2)/(r-r0)^2 LET yu= (y-2*y0+y2)/(r-r0)^2 LET ru=sqr((xu-x)^2+(yu-y)^2) REM Laplacian domain if mod(int(r*ru),2)=0 then SET COLOR 256-mod(int(r*ru),255) else set color 1+mod(int(r*ru),255) IF n>10 THEN PLOT 785/2+s1*x+100 ,565/2+s2*y NEXT n END