?

Log in

No account? Create an account
Notes from a Medium-Sized Island [entries|archive|friends|userinfo]
Jason

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Oct. 14th, 2003|11:03 am]
Jason
Heh. dfontaine was hacking a postscript sierpinski triangle as an exercise, and wrote it up on the whiteboard. Intentionally tweaking the rotations makes %!PS-Adobe 3.0

20 dict begin
280 280 scale
newpath
/tri{
dup 0 gt
{ 1 sub 0.5 0.5 scale 120 rotate
1 0 rlineto tri
1 0 rlineto -118 rotate 1 0 rlineto tri
1 0 rlineto -120 rotate 1 0 rlineto tri
1 0 rlineto 120 rotate 2 2 scale 1 add} if
} def
1.1 0.1 moveto
-1 0 rlineto 60 rotate 2 0 rlineto -120 rotate
2 0 rlineto 60 rotate -1 0 rlineto 7 tri

1 480 div dup scale
stroke
end
showpage
. I love how errors in graphics are as often as not not all that erroneous.
LinkReply

Comments:
[User Picture]From: dr4b
2003-10-14 01:25 pm (UTC)
お誕生日お目出度うございます!!!!!
(Reply) (Thread)
[User Picture]From: jcreed
2003-10-14 02:02 pm (UTC)
覚えているから、ありがとうございます!
(Reply) (Parent) (Thread)
[User Picture]From: easwaran
2003-10-14 02:21 pm (UTC)
My friend Luke and I did some of that when we made our movie mathporn, which will be shown again in Berkeley in a couple weeks.
(Reply) (Thread)
[User Picture]From: rjmccall
2003-10-14 04:11 pm (UTC)
For the postscript-disabled. From ghostview; slightly cropped.
(Reply) (Thread)