01 Nov 2007

L-System with Asymptote – fig0100

Category: Asymptote,L-System

Figure 0010
(Compiled with Asymptote version 1.84svn-r4619)
    
/*An animation of the 3D Hilbert curve may be found HERE*/
import Lsystem;
size(10cm,0);
currentprojection=currentprojection=orthographic((10,5,6));

string[][] rules={{"X","^<XF^<XFX-F^>>XFX&F+>>XFX-F>X->"}};
Lsystem3 HilbertCurve3D=Lsystem3("X", rules, La=90);
HilbertCurve3D.iterate(3);

// !! Use a lot of memory !!
/* path3[] g=HilbertCurve3D.paths3();
   draw(g[0], linewidth(bp)+0.9*yellow);
*/

HilbertCurve3D.drawpaths3(linewidth(bp)+0.9*yellow);

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

Étiquettes : ,