Inspired by this paper http://people.cs.kuleuven.be/~ares.lagae/publications/LD07TPP/LD07TPP.pdf I made a jigsaw puzzle composed of 25-ominos from the recursive tile packing of the complete set of corner tiles over 4 colours (figure 8). This is the postscript; %!PS %%Creator:postscript & polyomino design; Stuart Anderson, stuart.errol.anderson@gmail.com %%Title: 256 tiles, 4 coloured, corner tiling: =>256 tile 25-omino tiling %%BoundingBox: 0 0 1100 1100 % Complete set of unit square, corner-to-corner, 4 coloured tiles, % 4^4 = 256 tiles, tiled as 16x16 toroid % from 'The Tile Packing Problem' by Ares Lagae & Philip Dutre % squares with coloured corners replaced by 25-ominos % /TileSet4Colours [ % corner colour codes for 256 tiles using edge-to-edge 4 colour matching 056 108 057 028 180 062 156 182 046 248 239 027 228 059 252 047 206 179 222 119 237 251 095 245 143 242 159 118 157 246 223 183 043 232 123 221 151 214 103 249 015 240 079 241 111 217 087 229 186 174 250 127 125 109 185 254 031 244 063 236 187 110 121 173 198 163 218 231 219 167 234 203 115 253 255 191 238 139 226 155 045 184 126 189 078 177 158 054 220 247 207 243 175 058 172 122 131 210 199 195 035 200 099 233 075 209 055 204 147 230 171 202 036 104 041 040 168 010 160 170 026 116 205 051 092 181 190 030 165 138 162 154 166 042 152 134 082 213 039 216 071 225 235 091 149 022 164 090 133 146 086 037 088 117 141 114 061 140 178 094 089 101 153 102 025 100 073 161 106 201 003 208 215 007 224 107 066 145 070 129 098 137 034 136 130 050 044 120 093 053 188 142 004 080 021 020 132 018 148 038 024 212 135 194 083 197 211 023 017 084 085 069 033 072 097 169 074 113 029 052 076 049 124 077 064 065 081 005 128 002 144 150 006 192 067 193 019 196 227 011 000 016 068 001 032 008 096 105 009 048 060 012 112 013 176 014] def /tmpstr 30 string def % temporary used to convert number to text /unit {12 mul} def % Convert units->points (1/12 inch) /white{ 1.0 1.0 1.0 setrgbcolor} def /black{ 0.0 dup dup setrgbcolor} def /grey{0.5 setgray} def /red {1 0 0 setrgbcolor} def /Courier-Bold findfont 14 scalefont setfont 2.5 setlinewidth 1 setlinejoin % rounded linejoin 1 setlinecap % rounded linecap /cp {closepath} def /st {stroke} def /gs {gsave} def /gr {grestore} def /l {90 rotate }def % left turn /r {-90 rotate }def % right turn /fh {0.5 unit 0 rlineto}def % 1/2 unit forward /f {1 unit 0 rlineto}def % 1 unit forward /f2 {2 unit 0 rlineto}def % 2 units forward /f3 {3 unit 0 rlineto}def % 3 units forward /Cornertile { % draw cornertile based on colour code 0, 1, 2 or 3 /Colour exch def % function accepts colour code as argument to a switch statement coded using ifelse statements Colour 0 eq {fh l f r f r f l f r f r f l f l f r fh} {Colour 1 eq {fh l f2 r f r f2 l f r f r f2 l f l f2 r fh} {Colour 2 eq {fh r f l f l f r f r f l f r f r f l fh} {Colour 3 eq {fh r f2 l f l f2 r f r f l f2 r f r f2 l fh} if } ifelse } ifelse } ifelse } def black 0 0 1400 1400 rectfill % fill blackground 32 72 translate % move pen off origin (screen bottom right) 1 1 16 { % for loop=1 to 16; ++ /y exch def % y is equal to outer loop variable 1 1 16 { % for loop=1 to 16; ++ /x exch def % x is equal to inner loop variable /number {TileSet4Colours y 1 sub 16 mul x 1 sub add get} def % extract tile numbers from array, read rows, columns y 2 mod x 2 mod eq {white}{black}ifelse % use checkerboard black/white alternating fill for tiles gs % save gfx state newpath % start new path x unit 5 mul 17 y sub unit 5 mul moveto % moveto grid point % taking integer divisors and remainders from powers of 4 gives corner colours, 255 given as an example number 64 idiv Cornertile % eg 255 64 idiv -> 3 topleft corner colour /Remainder1 { number 64 mod } def % eg 255 64 mod -> 63 %6 Remainder1 16 idiv Cornertile % eg 63 16 idiv -> 3 bottomleft corner colour /Remainder2 { Remainder1 16 mod } def % 63 16 mod -> 15 %8 Remainder2 4 idiv Cornertile % 15 4 idiv -> 3 bottomright corner colour /Remainder3 { Remainder2 4 mod } def % 15 4 mod -> 3 %10 Remainder3 Cornertile % 3 1 idiv -> 3 topright corner colour gs cp fill gr % closepath fill tile interior gs grey stroke gr % stroke the tile edge path y 2 mod x 2 mod eq {black}{white} ifelse % text fill contrast to tile fill -1 unit -2.9 unit rmoveto % position text number tmpstr cvs show % show number of tile } for } for showpage % %%EOF I have a much simpler construction I'm working on. Stuart