Skip to content

Instantly share code, notes, and snippets.

@nst
Last active March 14, 2025 15:35
Show Gist options
  • Select an option

  • Save nst/696c31566a283588b7933415b3bd6aae to your computer and use it in GitHub Desktop.

Select an option

Save nst/696c31566a283588b7933415b3bd6aae to your computer and use it in GitHub Desktop.
%!PS
% Postscript implementation of Georg Nees "Schotter"
% Nicolas Seriot, 2022-09-20
% https://collections.vam.ac.uk/item/O221321/schotter-print-nees-georg
% golfed version
% /S 24 def/j{rand r mod 2 mul r sub 1 add}def 1 1 12{1 1 24{
% /r exch def gsave dup S mul r S mul neg S 2 add S mul add
% translate j rotate j j S S rectstroke grestore}for}for
/COLS 12 def
/ROWS 24 def
/SIZE 28 def
100 770 translate
1 -1 scale
/jig { rand r mod 2 mul r sub 1 add } def
1 1 COLS {
/c exch def
1 1 ROWS {
/r exch def
gsave
c SIZE mul r SIZE mul translate
jig rotate
jig jig SIZE SIZE rectstroke
grestore
} for
} for
showpage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment