Skip to content

Instantly share code, notes, and snippets.

@nst
Last active March 21, 2025 09:55
Show Gist options
  • Save nst/6194c0d8e50ded8172cbfb822ca7d72e to your computer and use it in GitHub Desktop.
Save nst/6194c0d8e50ded8172cbfb822ca7d72e to your computer and use it in GitHub Desktop.
/D{def}def/L 200 D/M{mul}D/P 50 D/N{P neg}D/G{get}D/a 0 D/b 0 D/c 0 D/o{0 G}D/O{
1 G}D L L translate{/v[[N N N][P N N][P P N][N P N][N N P][P N P][P P P][N P P]]
D/w 8 array D/f a cos D/d b cos D/e c cos D/s a sin D/t b sin D/u c sin D 0 1 7{
/i exch D/p v i G D/y p O f M p 2 G s M sub D/z p O s M p 2 G f M add D/x p o d
M z t M add D w i[x e M y u M sub x u M y e M add]put}for[[0 1][1 2][2 3][3 0][4
5][5 6][6 7][7 4][0 4][1 5][2 6][3 7]]{/E exch D w E o G o w E o G O moveto w E
O G o w E O G O lineto}forall 0 setgray stroke flushpage 9999999{}repeat 1
setgray -100 dup L dup rectfill/a a 1 add D/b b 3 sub D/c c 4 sub D}loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment