Thursday, July 31, 2008

Digital Art: Starring by Numbers



% (c) 1965 - Petar Milojević / (c) 2002 - Michel Charpentier / (c) 2008 - Yukao Nagemi
/random { rand 2.0 31.0 exp div} def
/open [ {gsave /depth depth 1 sub def depth 0.3 mul setlinewidth depth 5 div 1 exch sub setgray} aload pop ] cvx def
/close { stroke /depth depth 1 add def grestore } def
/- { 5 random 1.5 mul mul neg rotate } def
/+ { 9 random 1.5 mul mul rotate } def
/F { dup 0 eq { 0.0001 0 rlineto depth 4 mul random mul 10 sub 0 rmoveto } { 1 sub 8 {dup} repeat F F - open - F + F + F close + open + F - F - F close } ifelse pop} def
/Tree { F } def
gsave 1 setlinecap newpath 300 500 moveto 90 rotate /depth 6 def 6 Tree grestore
showpage

0 Comments:

Post a Comment

<< Home