Skip to content

Instantly share code, notes, and snippets.

@luser-dr00g
Created August 30, 2014 09:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luser-dr00g/d3f9cd0024ed15152765 to your computer and use it in GitHub Desktop.
Save luser-dr00g/d3f9cd0024ed15152765 to your computer and use it in GitHub Desktop.
my god! it's full of stars
/starpath { % n r1 r2 x y
matrix currentmatrix 6 1 roll % [] n r1 r2 x y
translate % [] n r1 r2
10 dict begin {/r2 /r1 /n} {exch def}forall % []
/da 360 n div def
r2 0 moveto
n {
da 2 div rotate
r1 0 lineto
da 2 div rotate
r2 0 lineto
}
repeat
closepath
end % []
setmatrix %
} def
10 30 70 300 400 starpath fill
20 40 50 400 500 starpath stroke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment