31 Oct 2007

L-System with Asymptote – fig0010

Category: Asymptote,L-System

Figure 0001
(Compiled with Asymptote version 1.86svn-r4626)
    
import Lsystem;
size(10cm);

string[][] rules={{"F","FF"}, {"X","--FXF++FXF++FXF--"}};
Lsystem Sierpinski=Lsystem("FXF--FF--FF", rules, La=60, Lai=0);
Sierpinski.iterate(5);
draw(Sierpinski.paths(), bp+0.2*green);

shipout(bbox(Fill(paleyellow)));

Étiquettes : ,