01 nov 2007

L-System with Asymptote – fig0210

Catégorie : Asymptote, L-SystemPh. Ivaldi @ 15 h 40 min

Figure 0021
(Compiled with Asymptote version 1.84svn-r4619)
    
/* Pavage de Penrose
  Source */
import Lsystem;
size(8cm,0);

string[][] rules={
  {"W", "YF++ZF----XF[-YF----WF]++"},
  {"X", "+YF--ZF[---WF--XF]+"},
  {"Y", "-WF++XF[+++YF++ZF]-"},
  {"Z", "--YF++++WF[+ZF++++XF]--XF"},
  {"F", ""}
};

Lsystem Penrose=Lsystem("++ZF----XF-YF----WF",rules,La=36);

Penrose.iterate(4);
draw(Penrose.paths(), linewidth(bp));

shipout(bbox(2mm, FillDraw(lightyellow,linewidth(1mm))));

  • del.icio.us
  • Facebook
  • Google Bookmarks
  • TwitThis
  • Digg
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati

Mots-clefs : ,

Laisser une réponse

Thank you to place all source code between the tags [code] and [/code]