Category: Iterated Function Systems
This procedure called IFS (Iterated Function Systems) plots a curved fern. The program was found in the book Bausteine des Chaos - Fraktale written by Heinz-Otto Peitgen, Hartmut Juergens and Dietmar Saupe and slightly modified for Maple.
> restart: > ifsmaple:=proc(imax) > # Iterated Functions Systems > # Originalprogramm 'Chaos-Spiel fuer ein Farnblatt' geschrieben > # in BASIC, ver"ffentlicht in: 'Bausteine des Chaos - Fraktale', > # Springer Verlag/Klett-Cotta, S. 415 von denselben Autoren > local e1, e2, e3, e4, f1, f2, f3, f4, x, y, xn, yn, z, pts; > pts:=NULL; > e1:=0.5; e2:=0.57; e3:=0.408; e4:=0.1075; > f1:=0; f2:=-0.036; f3:=0.0893; f4:=0.27; > x:=e1; > y:=0; > to imax do > z:=rand()/1e12; > if z<=0.02 then > xn:=e1; > yn:=0.27*y+f1 > elif z<=0.17 then > xn:=-0.139*x+0.263*y+e2; > yn:=0.246*x+0.224*y+f2 > elif z<=0.3 then > xn:=0.17*x-0.215*y+e3; > yn:=0.222*x+0.176*y+f3 > else > xn:=0.781*x+0.034*y+e4; > yn:=-0.032*x+0.739*y+f4 > fi; > pts:=pts, [xn, yn]; > x:=xn; > y:=yn; > od; > [pts] > end: > plot(ifsmaple(12500), axes=NONE, style=point, symbol=POINT, scaling=constrained);
Another version of 'IFS' uses the undocumentated goto command within the procedure: IFS2.MS or IFS2.TXT.
MAPLE V FRACTALS FERN #1.01 current as of July 27, 1997
Author: Alexander F. Walz, alexander.f.walz@t-online.de
Original file location: http://www.math.utsa.edu/mirrors/maple/mfrifs.htm