Friday, September 14, 2007

Jigsaw puzzles

One of those Weeks episode 17 revolved around what is essentially a jigsaw puzzle. Creating such a puzzle, both in the real world and on the computer, is a fairly simple task. The nice thing about jigsaw type puzzles is that not only is almost everyone familiar with them but there is a lot of flexibility in how the puzzle is put together.

If we look at making a real world jigsaw puzzle, it is a fairly simple task. You simply take a picture and glue it to cardboard or wood. Alternatively, you can create original artwork directly on the cardboard or wood. Once you have the artwork on the wood or cardboard, you take a cutting tool, such as a jigsaw, and cut the picture up into pieces. If you are using wood, you may want to carefully sand the pieces so you don't get slivers. You then have a unique puzzle.

I should point out that the shapes of the pieces do not have to be the traditional shape that most purchased jigsaw puzzles are, though that familiar shape has it's advantages. If you find some really old jigsaw puzzles, you may notice that many of them have more of a wavy shape to the pieces and often there are size variations in the pieces. The problem with this style of puzzle is the simple fact that the pieces don't stay together. The more modern puzzle piece have interlocking holes and tabs so that when assembled they do not easily come apart.

When writing a computer version of a puzzle, the biggest obstacle is with the graphics. It is always easiest to work with blocks of pixels, so often shapes are blocky in appearance. Another potential problem is the positioning of the pieces on the board. If all pieces are the same size, this can be treated as a grid (even if you are not using square pieces). Variable sized pieces are a bit trickier in that you would have to break the results grid into pieces that are the lowest common denominator in size and have pieces be aware that they are taking up multiple slots.

No comments: