Fichier blok3.mp (figure 1) — Modifié le 2 Mars 2005 à 00 h 43
% lsystem BLOK3.LS -- Thu Feb 13 00:54:56 CET 2003 %% Fichier de paramètres : BLOK3.LS % seed F - F - F - F % rule F -> F F - F + F - F - F F % delta 90 % theta 0 % leng 15 % iter 3 % x 100 % y -50 % blue 0 % green 0 % red 1 %% FIN du fichier input tortue; vardef trace(expr a,b) = draw a--b withpen pencircle scaled 1pt withcolor (1,0,0); enddef; vardef deplace(expr a,b) = enddef; vardef F(expr n,m) = if m>0: F(n,m-1); F(n,m-1); tourne(n,-90); F(n,m-1); tourne(n,90); F(n,m-1); tourne(n,-90); F(n,m-1); tourne(n,-90); F(n,m-1); F(n,m-1); else: avance(n,longueur,trace); fi enddef; vardef axiome(expr n,m) = F(n,m); tourne(n,-90); F(n,m); tourne(n,-90); F(n,m); tourne(n,-90); F(n,m); enddef; beginfig(1); longueur = 15; tortue(1,100,-50,0,1); axiome(1,3); endfig; end
Répertoires
mp-geo (27) mp-solid (102) geometriesyr16 (199) pfgiac (27) » Maxime Chupin (1) » Guillaume Connan (114) » Yvon Henel (3) » David Nivaud (3) » Vincent Pantaloni (23) » Christophe Poulain (18) » Jean-Michel Sarlat (67) Figures de cours (1) Divers (8) Forum Geometricorum (1) Géométrie dans l'espace (1) L-Systems [1] (46) L-Systems [2] (10) » Thomas Rey (12)