!IFS for Spleewort Fern
!x' = a11*x + a12*y + b1
!y' = a21*x + a22*y + b2
!
!Four affine transformations:
!1) Scaling of 0.16 in y direction only (stem)
!2) Scaling of 0.85 in x and y + Translation of 1.6 in y ! + Rotation of -2.5 deg.
!3) Scaling of .3 in x & and .34 in y + Translation of 1.6 in y ! + Rotation of 49 deg.
!4) Scaling of .3 in x & and .37 in y + Translation of .44 in y ! + Rotation of -50 deg. + Reflexion about y.
!This affine map must be a CONTRACTION so the following conditions must verify:
!a11^2 + a21^2 >1
!a21^2 + a22^2 >1
!a11^2 + a21^2 + a21^2 + a22^2 > (a11*a22-a21*a12)^2
!
SET MODE "graphics"
SET WINDOW -6*1.33,6*1.33,-1,11
OPTION NOLET
LET x = 1
LET y = 1
FOR i = 1 to 10000
LET q = 100*rnd
IF q<3 THEN
LET x=0
LET y=0.16*y
PLOT x,y
ELSE IF q<76 and q>=3 THEN
LET x = .85*x + .04*y
LET y = -.04*x + .85*y + 1.6
PLOT x,y
ELSE IF q>76 and q<89 THEN
LET x = .2*x - .26*y
LET y = -.23*x +.22*y + 1.6
PLOT x,y
ELSE IF q>=89 THEN
LET x = -.15*x + .28*y
LET y = .26*x +.24*y + .44
PLOT x,y
END IF
NEXT i
END