*******************************
* Jigsaw Simulator User Guide *
*******************************
This model aims to provide an interesting and enjoyable environment in which to
assemble a computer generated jigsaw puzzle. The model also demonstrates the
usefulness and applicability of the
Empirical Modelling approach, as well as the
power of the tkeden tools such as Eden, Donald, Scout, Arca and Eddi.
Getting Started
---------------
To run the model type "./jigsaw" in the terminal window. The model should load
automatically, though you may need to ensure you have the appropriate user
permissions. These can be changed if necessary by using the "chmod" command.
It takes approximately 2 or 3 minutes for the model to load, so please be patient.
This delay is because I have incorporated large databases detailing the red, green
and blue components of the tkeden colours. It takes time for Eddi to read in these
values. It also takes approximately 1 second for each line of Arca to be translated
to the underlying Eden notation.
**********
* Basics *
**********
Loading Images
--------------
The first thing to do is load a picture into the model, of which there are
several choices.I have kept in the two pictures that Cheryl Sidebotham's
original model used. The 'person' picture and 'clock' picture were both produced
using Donald (the definitive notation for line drawing).
The 'person' jigsaw is a traditional jigsaw, in which the picture is static
throughout the constructio
n process. It can be loaded by left-clicking the
'person' button.
In the case of the 'clock', the picture is animated, and the content of the jigsaw
puzzle pieces change dynamically even as the construction process proceeds. It is
started by left-clicking the clock button. The 'clock' picture can be frozen at any
point by clicking the 'timer' button on the interface. The picture can then be
set moving again by clicking 'timer' a second time.
The picture selected will be split into 25 pieces producing a 5 by 5 jigsaw. These
pieces are jumbled up and displayed in the box on the top left of the interface.
The completed picture which you are aiming to produce by assembling the pieces is
also displayed. To make the puzzle more difficult, this picture can be removed from
the display by interacting with tkeden directly. To do this, make sure the tkeden
input display is ready to accept Eden commands by clicking the Eden icon at the top
of the interpreter. The redefinition
showpicture = 0;
will then instantly remove the picture from the interface.
One extension I have added to the model is the facility to load in photographic
images in the form of GIFs. Like the person and clock, there are two predefined
GIFs that can be loaded into the model at the touch of a button - 'pattern' and
'andrea'.
I have also added the facility to load in your own GIFs, so one can assemble a
picture of a loved one, or a pet, etc. This can be done by pressing the
'Load Image' button. A file chooser manager then appears asking you to select your
desired GIF. This file is then automatically scaled and loaded into the model. This
option works best with square images, but all shapes will work - only there may be
some space around the image, where it has been scaled to fit the box. I decided it
was best implemented this way rather than distorting the image by making it fit the
jigsaw exactly. Note, the chooser box will not come up if the tkeden input window has
been minimised
Selecting and Moving Pieces
---------------------------
To carry out the jigsaw construction process, you must first select a jigsaw
piece from the box (top left corner) by left-clicking the mouse on the desired piece.
The border of the piece becomes thicker indicating which piece you have selected.
Next, click
the workspace at the point where you wish to position the left-hand
corner of the selected piece. The selected piece remains selected (and can hence
be repositioned by further clicks) until such time as you de-select it by clicking
on it once again (the border will decrease accordingly). At any stage, it is
possible to select a piece from the workspace as well as the jigsaw box using
this same protocol.
********************************
* Joining and Splitting Pieces *
********************************
The basic activities in any jigsaw puzzle are the joining and separating of
pieces. These processes in the existing model were unfortunately conceptually
poor. Hopefully now, these re-written procedures are a richer, more detailed
model of the processes.
Joining Pieces
--------------
To join two pieces together, position them reasonably closely (say within a
few millimetres) and align them how you wish them to be joined. Click on one
of the pieces, and without deselecting this piece, select the piece you intend
to join it to, then press the 'join' button. If the pieces are located
sufficiently closely, the join will be made. In this case the result is
analogous to the join in a real jigsaw puzzle, in that the pieces can now be
treated as one. This means that when moving one piece, the other should move
with it. For simplicity, only one piece of each connected block can be moved.
This is the piece that is the highest in the segment. If more than one piece is
at this level, it is the piece furthest to the left. All other pieces connected to it
will move accordingly. This is one
of the main benefits of the Empirical Modelling
approach; it is easy to set up such dependencies between pieces. After the join,
both pieces will become de-selected so other pieces can be joined to them.
Progress towards completing the jigsaw can be monitored by inspecting the Arca
diagram, done by clicking the 'show arca' buttton. This display describes the
current state of the jigsaw by displaying the connections between pieces, and
is the underlying conceptual model of the jigsaw. The nodes numbered 1
to 25 represent the 25 pieces and the coloured links between then describe the
current connections or joins between pieces. Horizontal links are represented
by red and green lines, while vertical joins are represented by blue lines.
It is by no means necessary to use this diagram to complete the puzzle, in fact
it is probably more challenging and interesting without it. The display can be
removed by clicking 'show arca' once more. For more information about Arca and
it's use in the model, see the final report.
To connect large blocks of pieces together, position the two blocks closely
using the same idea as above. Move the blocks by re-positioning the dominant,
top-left piece of each segment. Next, select 2 pieces that should be connected,
1 from each block, before left-clicking 'join'. All other pieces that are adjacent
get connected, and the whole block now behaves 'as one'. The Arca diagram will
show this, as each vetex in the block is connected by edges to its neighbours.
When a segment of reasonable size is produced by continuing the join procedure,
it can be moved down into the grid in the workspace. Click on the dominant
piece of the segment then click on the desired position on the grid where you
would like that piece to go. All of the pieces connected to this piece will
then automatically be positioned in their appropriate positions around it.
Splitting Pieces
----------------
Inevitably, mistakes will be made and pieces will be joined together
incorrectly. The split procedure is designed to rectify this and allow the
assembler to recover from any mistakes.
The procedure to split pieces is similar to the joining process. Select the
first piece you wish to remove, then, without de-selecting this piece, select
the piece from which you would like the first piece to be separated then click
the 'split button'. The join between these two pieces is then broken. This can
be inferred from the removal of the link between the nodes in the Arca diagram
(if it's displayed). There are two scenarios as to the result of the split,
either the pieces are now completely separated (e.g. only 2 connected pieces
originally) or the pieces are still connected via other pieces (as possible
when splitting two pieces in a large connected segment). In the former case,
the segment then splits into two distinct segments each with their own
dominant, position controlling piece. In the latter case there is no actual
separation of pieces and the dominant piece remains the same. In order to
completely split pieces in this scenario, several splits may have to be made.
Jigsaw Completion
-----------------
To determine whether or not the jigsaw has been completed, i.e. all pieces
are correctly joined together, press the 'finished?' button. The ARCA connections
are inspected and an appropriate message is written to the teminal conveying the
outcome.
********************
* Tools and Extras *
********************
An extension to the model was the implementation of a search function, which
will automatically select, for the assembler, pieces with desired properties.
This is similar to the methodology that many people use when constructing real
jigsaws; search for all the edge pieces first, position these, then start to fill
in the middle section. Note, these tools aim to reduce the medial and mundane
tasks for the user, they don't aim to take the challenge and enjoyment out of
constructing the jigsaw.
Corner Pieces
-------------
A good place to start when constructing a jigsaw usually, is to search for the
four corner pieces. This can be done automatically by making sure 'Corners' is
displayed on the whichSearch button, which is just below the 'Search For...' button.
To cycle through the different options for the search, left-click the whichSearch
button. The options are Corners, Edges, Colours and Single Pieces. When
'Corners' is displayed, pressing the 'Search For...' button will then
automatically highlight the 4 corner pieces with thick black borders. Where
pieces overlap, the highlighted pieces will also be displayed in front of all
other pieces so you can quickly and easily identify the pieces that the
search has returned. Any pieces that are both highlighted from the search and
selected to move can be distinguished from those just highlighted by an even
thicker border.
Edges Pieces
------------
Selecting all edge or outer pieces of the jigsaw is a very similar process
to that of selecting the corners. Make sure the whichSearch button displays
'Edges' and click the 'Search For...' button. The 16 edge pieces will then be
highlighted.
Searching For Colours
---------------------
Another useful search facility is to be able to pick out all pieces which
contain a certain colour. For instance, one might like to be able to find all
pieces that contain the colour blue if they are trying to construct the
section of the jigsaw that contains sky.
You probably know a coloured pixel is defined by 3 variables: its red, green and
blue attributes. These variables combine to produce the shade of each colour. As
a result, I have included several large Eddi tables (Eddi is the definitive
notation for producing databases) containing information about the tkeden colours
and their red, green and blue values.
Unfortunately, the option to search for coloured pieces can only be used with
GIFs loaded into the model. As yet, there are no options to inspect the colours
of a Donald drawing. There are 3 different options as to how to search for
colours:
a) normal search
This is the simplest search, in which each pixel of every piece is inspected. The
search will highlight the pieces which contain at least one inspected pixel that
matches the colour selected. To do this search, select the 'Colour' option on the
whichSearch button, and make sure 'Normal' is displayed on the whichColourSearch
button at the top of the interface. After selecting the desired colour for which
to search, by clicking the whichColour button repeatedly until your colour is displayed
(default is blue), run the search by pressin
g the 'Search For...' button. Note that
due to restrictions on the memory and to return results in a reasonable time, the
search only inspects every 10th pixel in both the horizontal and vertical direction.
This can be altered however by changing the pixelAccuracy variable. A redefinition such
as
pixelAccuracy = 5;
will then set the search to inspect every fifth pixel of the picture.
The pieces deemed to be of a specific colour will be highlighted in a similar
way to the corner and edges searches. The only difference is the colour of the
thick border - it will be the colour the search engine deemed the piece to be.
This will allow you to tell at a glance which pieces contain which colour pixels.
A frequent problem with the searching of specific colours comes from the common
occurrence of there being isolated pixels in the image. If this isolated pixel of
a specific colour is inspected, the piece will be deemed to be that colour, when in
fact the pixel is barely noticeable to the human eye. As a result, I have produced
2 variations on the colour search which aim to overcome this problem.
b) percenatge search
This search will highlight only the pieces where at least 10% (the default value)
of those pixels inspected match the selected colour. Like above, this 10% figure
can be altered on-the-fly. The command
pecentageSearch = 0.2;
will change this value to 20% for example, and produce a less restrictive search.
c) adjacent search
This is a useful search that will not include pieces where an isolated pixel of
a particular colour exists. Instead it will only highlight pieces which
contain a square of at least 2 by 2 pixels of the same colour.
If you are after an exhaustive search and want to inspect each and every pixel,
run
the normal search with a low pixelAccuracy value.
Searching for Single Pieces
---------------------------
Especially when nearing completion of the jigsaw, it may be useful to see at a
glance which pieces are as yet not connected to any other pieces. This can be
done by making sure 'Single Pieces' is displayed on the whichSearch button,
and then clicking the 'Search For...' button.
Clearing the search
-------------------
Once the information from the search has been used, you can remove the thick
borders from all pieces by clicking the 'Clear Search' button.
Arithmetic Environment
----------------------
I think it is important to imagine the wider context of the jigsaw puzzle
environment, and what other purposes it can be adapted for. One example is as an
aid to learning. To show how the model can easily be modified to facilitate such
an application, I have implemented a jigsaw where the pieces show numerical digits
and operators. The aim of this puzzle is then to connect the pieces so that the
horizontal and vertical columns produce correct equations. Left-clicking the "Maths"
button will produce a predefined jigsaw of this type. I have implemented Donald
views of each of the 10 digits and the 4 basic numerical operators, as well as the
equals sign. These can be easily displayed on any of the pieces, so it is possible to
produce many different versions of this idea if desired.
-------------------------------------------------------------------------------
Any Questions? Email me at csvfr@dcs.warwick.ac.uk
James Butcher 2003