31 Oct 2007

L-System with Asymptote – fig0030

Category: Asymptote,L-System

Figure 0003
(Compiled with Asymptote version 1.84svn-r4619)
    
/* Source */
import Lsystem;
size(10cm,0);

Lsystem SierpinskiCarpet=
  Lsystem("F+F+F+F",
          new string[][]{{"F","FF+F+F+F+FF"}},
          La=90, Lai=0);
SierpinskiCarpet.iterate(4);
draw(SierpinskiCarpet.paths(), bp+0.2*green);

shipout(bbox(Fill(paleyellow)));

Étiquettes : ,