01 Nov 2007

L-System with Asymptote – fig0140

Category: Asymptote,L-System

Figure 0014
(Compiled with Asymptote version 1.84svn-r4619)
    
// Peano Gosper curve
import Lsystem;
size(8cm,0);

Lsystem PeanoGosperCurve=
  Lsystem("FX",
          new string[][]{{"X","X+YF++YF-FX--FXFX-YF+"},{"Y","-FX+YFYF++YF+FX--FX-Y"}},
          La=60, Lai=0);
PeanoGosperCurve.iterate(4);
draw(PeanoGosperCurve.paths(), bp+0.9*yellow);

shipout(bbox(3mm, Fill(black)));

Étiquettes : ,