Skip to content

Instantly share code, notes, and snippets.

@pjt33
Created August 9, 2014 08:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pjt33/c24507d183723c7690e4 to your computer and use it in GitHub Desktop.
Cairo pentagonal grid
%!PS-Adobe-2.0
%%Creator: Peter Taylor
% Force A4 portrait.
<</PageSize [595 842]>> setpagedevice
/hex {
currentpoint
8 14 rlineto
6 0 rlineto
8 -14 rlineto
-8 -14 rlineto
-6 0 rlineto
-8 14 rlineto
4 7 rmoveto
7 -4 rlineto
7 4 rlineto
-7 -4 rmoveto
0 -6 rlineto
7 -4 rlineto
-7 4 rmoveto
-7 -4 rlineto
moveto
} bind def
/row {
currentpoint
12 {
hex
28 0 rmoveto
} repeat
moveto
} bind def
-14 842 moveto
4 4 scale
0.25 setlinewidth % compensate for the scale
16 {
row
14 -14 rmoveto
row
-14 -14 rmoveto
} repeat
stroke
showpage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment