Graftals in GF. examples/graftals

This commit is contained in:
krasimir
2009-02-14 14:07:04 +00:00
parent 8ec1a5643e
commit 37aebd395c
5 changed files with 65 additions and 0 deletions

12
examples/graftals/Koch.gf Normal file
View File

@@ -0,0 +1,12 @@
concrete Koch of Graftal = {
lincat N = {f : Str} ;
lincat S = {s : Str} ;
lin z = {f = F} ;
lin s x = {f = x.f ++ L ++ x.f ++ R ++ x.f ++ R ++ x.f ++ L ++ x.f} ;
lin c x = {s = "newpath 10 550 moveto" ++ x.f ++ "stroke showpage"} ;
oper F : Str = "2 0 rlineto" ;
oper L : Str = "+90 rotate" ;
oper R : Str = "-90 rotate" ;
}