Tilings

Purpose of the Program

The familiar tiling of a kitchen or bathroom wall is usually produced by 
placing square or rectangular tiles edge-to-edge and corner-to-corner
over the wall. Many more interesting tilings can be formed by tiles of
more complex shapes. Such tilings are produced by placing a shaped tile
in a number of orientations, repetitively over a plane. For the tiles to
fit together, only certain orientations of the tiles can be used, and
they in turn constrain the allowed shapes. In spite of these
restrictions, there are vast numbers of possible tilings which are
really limited only by one's imagination. The Dutch artist M C Escher
was the great pioneer and exploiter of this idea. A tutorial on Escher
tilings can be found in an Impression file available separately.

The main purpose of this program is to allow appropriate shapes to be
generated and the associated tilings to be produced. 

General Form of the Program

Double clicking on the !Tilings icon will install it on the iconbar in
the  usual way.  All possible Escher-type tile shapes can be generated
from 28  basic types of template; these can be used to form tilings
belonging to each of the 28 so-called Heesch tilings systems, numbered
H1 to H28 and named after H.Heesch who first enumerated them. Clicking
on the iconbar icon in the usual way opens a window giving access to
tabbed cards, containing typical templates classified either by the
number of sides they have or by the symmetry group to which the
associated tiling belongs. Templates take the form of triangles,
quadrilaterals, pentagons, or hexagons and each template gives rise to a
tiling belonging to one of the seven plane symmetry groups, labelled p1,
p2, p3, p4, p6, pg, or pgg. Clicking on a tab with SELECT or ADJUST will
reveal a card with all the templates of the type defined by the tab
label.

Clicking with SELECT or ADJUST on any template takes you into the design 
routine for the tiling system based on the chosen template. Each
template has an associated menu giving access to other features of the
program which are described later after details of the design routine
have been covered.

Most aspects of the program other than the design routine multi-task in
the usual way. The design routine does not. It operates in a
single-tasking mode, but on quiting it, you return to the normal
multi-tasking aspects of the program. This return involves the reloading
of a considerable number of files from the hard disc and can take some
time, whose length is comparable to that taken to load the program
initially and depends on the access time of your hard disc- it takes
around 7 seconds on my A5000. The design routine operates in screen mode
27 and the screen will  automatically switch to this mode when the
design routine is entered and switch back to the Desktop screen mode
when it is left. 

Templates

The concept of a template is fundamental to tile design. A template is
characterised by a number of basic points shown as heavy dots, joined by
straight lines. The geometric figure formed in this way is either a
triangle,quadrilateral, pentagon, or hexagon. The straight sides can be
associated in pairs indicated by half-arrows of the same colour on each
line, or a side can be divided into two related halves, having
half-arrows  of the same colour. Triangular and pentagonal templates
always have at least one of the latter types of side. A tile can be
formed by each of the full or half straight sides being distorted into
any shape, as long as its partner,  ie the line carrying a half-arrow of
the same colour, is distorted to the same shape with a relative
direction and handedness defined by that of the two half-arrows. One of
the main purposes of the design routine is to ensure that the correct
relative shapings are carried out. 

The sides of a pair can be labelled with T, Gh, or Gv,indicating that
the lines are related respectively by translation, by a glide reflection
in the horizontal or by a glide reflection in the vertical. Unlabelled
pairs are related by a rotation whose size is shown in degrees at the
common vertex around which the rotation takes place. The two halves of a
divided side are always related by a 180 rotation.   

The forms of templates themselves can be modified by moving the basic
template points, subject to appropriate constraints. Clearly for
example,  line pairs must retain the same length, those related by
translation must remain parallel, and those related by say a 90
rotation must remain at 90to one another. The program allows
modifications to be made, consistent with the required contraints of the
particular template.  


Design Routine Details
                                                          First Screen
(Forming a template)

On running the design routine, a screen is displayed showing an outline
of an appropriate template for the chosen system. Its form, proportions
and position can be altered within the constraints of the system by
dragging  the yellow squares with the mouse  pointer and holding down
ADJUST. The dimensions of the template as it is being altered are shown
in graphic  units; this can be useful in creating the  correct
proportions when reproducing a design  from a drawing. When the  desired
form of the template is set up, it is fixed by clicking SELECT, and the
second screen is shown.

Second Screen (Shaping and decorating a tile)

This displays the main design screen. The chosen template is reproduced,
showing its fixed points. A small replica shows with coloured, half
arrowheads the related pairs of sides or segments; these can be shaped
only in corresponding ways as indicated by the arrowheads.

In designing a tile, four modes of operation are available - Shape,
Decorate, Erase, and Resize. These are chosen from the menu which is
always shown in one of its two states - active, dark red, or passive,
light grey. When passive, the current mode is shown in black. The menu
can be activated virtually at any time by clicking the MENU button, and
a new mode or other option chosen using the SELECT button. The grid and
basic motif outline can be toggled on and off, and for convenience this
can also be done with ADJUST which will leave the menu active. The
design can be saved at any time as a datafile by choosing Save Design,
giving the design a name and pressing RETURN; if no name is entered for
the design and RETURN  simply pressed, the design will not be saved and
the program will return to the active menu. The Show Cluster option
moves the routine to its third screen, described below.

Of the four modes, Shape is used to produce the shaped tile outline,
Decorate allows internal decoration of the shape, Erase allows curves to
be deleted, and Resize allows the overall size of the tile to be
altered.

Shaping

When shaping, the routine must know which line is being worked on, so
that the corresponding line to be shaped simultaneously is defined. The
line is chosen by clicking SELECT with the mouse pointer on the
appropriate arrowhead on the replica template; its choice is indicated
by a circle round the arrowhead. Any shape can then be drawn between the
extremities of the chosen line of the template; at the same time the
corresponding shape will be drawn by the routine between the extremities
of the corresponding line. 

Drawing the shape is done through a number of Bezier curves joining the
two extremities of the line. The endpoints of these joined Bezier curves
are created by clicking SELECT with the mouse pointer approximately
where you wish each one to be; the first must be at one line extremity,
the last at the other. On SELECTing the last, the control points for all
the curves appear. These, as well as the endpoints - except those at the
fixed line extremities - can then be be dragged around using the ADJUST
button to produce the desired shape, which is fixed by clicking SELECT.
The shape can be edited at any later time simply by SELECTing the
segment or its corresponding partner in the replica template when in the
Shape mode.

Decorating

Decoration is carried out in a similar way. But only one curve is drawn
at a time, and there is no need to choose lines to be worked on.
Decoration should remain inside the tile shape and to indicate this the
inside of the shape is coloured grey in this mode; the Bezier curve
endpoints can be placed only within this area. The start of the
decoration curve is defined  by the first click  on SELECT, and the
finish is defined by clicking ADJUST after the last point has been
SELECTed. This reveals the control points and allows curve shaping to be
carried out as before, except that in this case the start and finish
points are also moveable.

Both the control points and endpoints can be in fact be dragged outside
the grey tile shape, but this should be done only to the extent that the
decoration itself remains within the tile shape. The endpoints
themselves cannot initially be placed on another line, be it a side of
the tile shape or another decoration. The ability to move the endpoints
afterwards is important in allowing this to be achieved for appearance
sake or to ensure that an area, totally enclosed by black lines, is
available for colouring later - see the later instructions on colouring
for more on this. 

Clicking on ADJUST outside the sequence of events just described, as
long as you are in Decorate mode, toggles on and off startpoint markers
of the various decoration curves. When they are on, clicking SELECT on
one of them displays the control  points for that curve and allows its
shape to be edited. New curves can still be drawn whilst this option is
on.

Erasing

If editing line or decoration shapes is unsatisfactory, as a final
resort  any line pair or decoration curve can be erased. To avoid this
being done inadvertently, the separate Erase mode must be entered. Then,
on SELECTing  any segment in the replica template, the current shape of
it and its partner will be erased. SELECTing the "D" which appears in
the centre of the  replica template in this mode, reveals the startpoint
markers on each decoration curve; clicking SELECT on any of these will
erase the associated  curve.
                 Resizing

Resizing allows you to change the overall size of the shape at any time
- before, during and after forming and decorating the tile shape. The
final size chosen determines the the tile size in the final tiling.
However, resizing can also be useful in blowing up the shape size
temporarily to make it easier to get  a small detail correct. When
Resize is chosen, a scale with a cursor appears. Dragging the cursor
along the scale allows resizing by factors between 0.5 and 1.5 to take
place by clicking on the OK icon.  Further clicking on OK will produce
further resizing.  The program ensures that you do not increase the tile
size too far, causing parts of the tile or its control points to extend
beyond the allowed white work area on the screen.

On completion of the design, or at any other stage, Show Cluster can be 
selected from the menu. This produces the third screen.

Third Screen (Forming and colouring the cluster)

In any of the tiling systems, a number of tiles, each possibly in a
different orientation, form a cluster. This cluster is such that the
tiling is generated by placing the cluster repetitively over the whole
plane in a single orientation. The appropriate cluster for the system
being worked on is drawn on the third screen. In some systems, this is
larger than is required geometrically, so that colourings can be
achieved in which adjacent tiles in the tiling are always of different
colours. The cluster is formed with grey tiles against a white
background.

A menu with characteristics similar to that on the second screen is also
present. It provides colouring and tiling options as well as
repositioning of the cluster and return to the previous screen for
redesign of the tile.

To colour the tiles in the cluster before forming the tiling, the colour
option should be chosen. In this case a colouring palette is revealed,
from which colours can SELECTed and areas of a tile, defined by a closed
outline, coloured by pointing and SELECTing. Colouring can also be done
with ADJUST; this leaves the mouse pointer in the cluster which is
convenient if the same colour is to be used in another area. If colour
leaks out of the chosen area to colour neighbouring ares, it is because
the area is not closed and there is a gap, often very small, at a join
of two lines which define the area's outline. To cure this, you should
return to the previous tile design screen by choosing the Redesign
option in the menu, and close the offending gap.

The white area around the cluster cannot be coloured. Within the cluster
any colour can be used from the palette, but once an area has been
coloured black or white it cannot be changed without returning to the
single tile design, by choosing Redesign, and reforming the cluster. Any
of the other colours can be changed at will.

On selecting the Tiling option, the screen will blank out and the full 
tiling will be built up. On occasions it may be found that the cluster
as drawn on the screen will go off-screen at the top, bottom or left, or
extend to the right beyond the white  work area. To avoid the imperfect
tiling which will result from such an occurrence, the Reposition option
should be used. This allows a vector to be set up with the ADJUST button
from the origin of the small  set of axes  which is displayed. When the
vector is SELECTed, the cluster will be redrawn, displaced by the
length, and in the direction of the vector. In the unlikely event that
the cluster cannot be moved far enough in one displacement, the process
can be repeated as many times as required. To  avoid wasted effort,
repositioning be should done before any colouring is carried out, since
colours are lost in the repositioning.

Fourth Screen (Displaying and recolouring the tiling)

This screen is completely filled with the tiling. No menu is shown
unless called for by clicking on the MENU button. Options for changing
the colours in the tiling, saving the tiling, returning to the cluster
screen, making a print-out of the tiling, killing the menu, or quitting
are all available.  

When Recolour is selected, a colour editor appears, in which a copy of
the colour of the tiling at the mouse pointer is shown. Clicking SELECT
in the tiling on the colour to be changed allows it to be altered using
the  ADJUST button on the red, green, and blue slider bars in the
editor. The modified colour is shown in the tiling itself and in the
colour editor box. It is fixed in the tiling by clicking SELECT on the
OK box; clicking SELECT on the Cancel box cancels the adjustment and
returns the tiling to the original colour. Clicking MENU when no colour
is selected returns you to the Tiling Menu.

The Save Tiling option operates similarly to that for saving a design,
with the tiling saved as a compressed data file. The associated cluster
and basic tile shape are also saved in the same way in files, the option
being given of colouring the basic tile before it is saved.

Selecting Print will produce a print-out of the tiling. If you want a
print-out of the cluster or the tile itself, the tiling must first be
saved. A print-out can then be obtained through the Available Tilings
route, described below.

Patterns

If no tile edges are drawn in an array of decorated tiles, what is left
is often referred to as a pattern, as opposed to a tiling. The pattern
consists of an array formed by the tile decorations regularly placed
over the plane in a variety of different orientations, determined by the
tiling system chosen.

To produce such a pattern, a closed tile outline must first be made and
the desired figure for the pattern drawn as a decoration inside this
outline. The tile outline should then be erased. Forming the cluster,
colouring the figures and then using the Tile option will form the
pattern. 

Template Menu Features

Each template on the tabbed cards has a similar menu offering System
details,  Available tilings, and Available designs. The latter two items
refer to tilings and designs which have been previously saved. They are
greyed out if nothing has been saved, but in each system at least one
design and its associated tiling have already been saved for you. Where
the design or tiling name is followed by a number, eg Bird_106, the
tiling is based on one by Escher and the number corresponds to that in
his list of so-called regular division drawings. 

The three options are now described in more detail in reverse order.

Available Designs

Clicking on this option opens a small window with a list of choices. In
the upper part are listed the designs in the chosen system which have
been saved and are available, using the names you originally gave them.
When one of these is chosen, the other previously greyed out options,
Load, Delete and Save as Drawfile, become active and refer to the chosen
design. 

Choosing Load will move you into the design routine with the chosen
design loaded. It can then modified or used as the basis of a further
design as you wish, and then re-saved under the same or another name.
Quitting the design mode at any time will return you to the tabbed card
from which you were working.

The action of the Delete option is obvious. But to prevent you deleting
a design inadvertently, a warning box asks you to confirm or cancel the
deletion.

Save as Drawfile allows you to do as it says, in case you prefer to have
your tile design in that form. Clicking on it will open a Save as
window, allowing the Drawfile to be dragged to wherever you wish to save
it.

Available Tilings

This option is similar, but applies to previously saved tilings. Having
chosen a tiling, a number of options are available  - Show, Print,
Delete, Make sprite of ...., and Access Sprites.

Choosing Show results in the whole screen being filled by the tiling.
Then clicking repeatedly on SELECT will cycle the display through the
cluster, the single tile, and back to the tiling. Using ADJUST instead
will cycle the display in the opposite direction. At any time the tabbed
card can be returned to by pressing Escape followed by Return.

Choosing Print results in a print-out of the full tiling. 

Delete operates in same way as for designs.

The rest of the options  are concerned with producing sprite versions of
your tiling, its cluster, or the single tile so that they can be used in
other applications. Choosing Tiling will fill the screen with the tiling
and it will automatically be saved as a sprite. Pressing Escape followed
by Return returns you to the tabbed card window as for the Show option.
Choosing Cluster or Single tile results in a similar process, but in
these cases a rectangle is also shown on the screen along with the
cluster or tile. This defines the area to be saved as a sprite. Its
position can altered by dragging the yellow square at its bottom left
corner with ADJUST, and its size by doing the same on its top right
corner. The sprite is not saved until SELECT is clicked inside the
rectangle. Escape followed by  Return again takes you back to the tabbed
card window at any time.

The final option, Access sprites, is active only when saved sprites are
available. Choosing it with SELECT opens a filer window containing up to
three sprite files, labelled Tiling, Cluster, and SingleTile, which can
be used as you wish. Since the design routine uses a modified colour
palette with more colours and fewer shades of grey than the standard
Desktop palette, you will  find that sometimes, depending on what
colours were used, the sprites will not be displayed in the original
colours. To overcome this, using ADJUST on choosing Access sprites will
open an additional filer window, with two palettes - !TileColrs and
!StdColrs. Running the first will show your sprites in their original
colours (and some of your Desktop colours will change). Running the
second will take you back to the standard default Desktop colours.

An alternative way of viewing any of the Available tilings for any
system is through the Library option in the iconbar menu. Choosing this
opens a window listing all available tilings. Any one can be viewed by
clicking on its name. The tiling, cluster, and single tile can be cycled
through as for the Show option above, and Escape followed by Return
returns you to the list of tilings.

System Details

Clicking on System details opens a window containing information on the
chosen tiling system. It shows a typical template again, the resulting
cluster, and a section of the associated tiling, as well as a statement
of the constraints that must satisfied by the template. In the cluster
each template tile contains either a number indicating the number of
degrees by which it is rotated from the original template, or the
symbols Rv or Rh if it is obtained by reflection in the vertical or
horizontal. The tiles in the section of tiling are decorated with dogs
which indicate their orientations.

The window has a menu with three choices - Show/Remove symmetries,
Print, and Design mode. The latter takes you directly into the design
routine for the chosen system, and Print allows you to print out a copy
of the window either with or without the symmetries showing.

The first option, Show/Remove symmetries, toggles on and off a number of
coloured symbols and lines on the tiling section which indicate the
symmetries of the tiling. These are not unique to the chosen tiling, but
to the symmetry group to which it belongs. The symbols are of three
types:

1) Two connected orange lines indicate the translational symmetry of the
   tiling. Moving the tiling in the direction of either of these lines
   by a distance equal to the line's length, or any multiple of that,
   will leave the tiling unchanged.

   It should be noted that the cluster can be larger than one would
   expect from the lengths of the translational symmetry lines. The
   latter do not take any account of tile colours, whereas the cluster
   size is chosen to allow tile colourings that ensure neighbouring
   tiles are always of different colours.

2) Diamonds, triangles, squares, and hexagons denote axes normal to the
   screen of 2, 3, 4, and  6-fold rotational symmetry. Around these axes
   the tiling can be rotated by 180, 120, 90 or 60 respectively
   without changing its layout.

3) Lines with tabs indicate glide reflection axes. Reflecting the tiling
   in such a line and moving, ie gliding, it along the line by the
   distance between tabs will again leave the tiling unchanged in
   appearance. Some of these symmetries can be directly related to the
   relations between pairs of template sides. When this is the case, the
   symmetry symbol has the same colour as the related template
   half-arrows. When the relationship is less direct, a new colour is
   used. With the glide reflection axes, the template orientation has
   always been chosen so that they are either vertical or  horizontal.
   This need not be the case, but they must always be orthogonal. 

Iconbar Menu

As well as the usual Info and Quit items, the iconbar menu has a third
item Library. Clicking on this opens a long window which lists all the
systems and the tilings available in each one. SELECTing one of these
will show the tiling. Clicking on SELECT or ADJUST will cycle the
display through the associated cluster and single tile in opposite
directions as before. To return to the menu, press Escape followed by
Return.

Happy tiling!

Comments and queries to:-
         Tom P McLean,
         Kinlochard,
         Purlieu Wood,
         MALVERN WR14 4DJ

         e-mail: tpm@argonet.co.uk


