SET MODE "color" SET WINDOW 0,1026,0,750 SET BACKGROUND COLOR "white" REM rainbow LUT(look up table) FOR j=31 to 0 step -1 LET k=j/31 REM intensity levels FOR red0=0 to 1 FOR green0=0 to 1 FOR blue0=0 to 1 REM colors of eight different kinds in 32 intensities SET COLOR MIX (count) k*red0,k*green0, k*blue0 LET count=count+1 NEXT blue0 NEXT green0 NEXT red0 REM color bits NEXT j SET BACKGROUND COLOR "white" LET x=1/sqr(2) LET y=1/sqr(2) LET a=0 LET b =0 LET s1=310/3 LET s2 =s1*750/1026 RANDOMIZE PRINT"fern I.F.S. with alternating partial derivative" PRINT"BY R.L.BAGULA 11 March 1999 ©" REM derivative dimension LET s0=1/6 FOR n= 1 TO 256000 LET a =RND REM alternating c from (-1,1) LET c=-1+2*mod(n,2) REM polar coordinates LET r=sqr(x*x+y*y) LET w=angle(x,y) REM angular partial derivative LET x=r*cos(w-c*s0*Pi/2) LET y=r*sin(w-c*s0*Pi/2) REM fern IFS IF a <= 1/4 THEN LET x1 = 0.85* x + 0.04* y + 0 LET y1 = -0.04* x + 0.85* y + 1.60 END IF IF a<= 1/2 AND a>1/4 THEN LET x1 = 0.20 *x -0.26 *y + 0 LET y1 = 0.23 *x + 0.22 *y + 1.60 END IF IF a<= 3/4 AND a>1/2 THEN LET x1 = -0.15* x + 0.28* y + 0 LET y1 = 0.26* x + 0.24* y + 0.44 END IF IF a<= 1 AND a>3/4 THEN LET x1 = 0 *x + 0 *y + 0 LET y1 = 0 *x + 0.16* y + 0 END IF SET COLOR 255 LET x=x1 LET y=y1 IF n>10 THEN PLOT 1026/3+s1*x+50,750/3+s2*y-100 NEXT n END