Spiro  -  Pattern creator

by Richard Taylor

If you are running this program on a Risc PC, you should use a screen mode with 256 colours or less if you want to see the patterns displayed in the correct colours.

A spirograph consists of a toothed clear plastic ring, pinned to a piece of
paper inside which rolls a similar plastic wheel. This wheel itself has
holes into which a coloured pen may be placed. As the wheel moves, the pen
follows a looping trajectory and beautiful symmetrical patterns may be
produced. This application allows you to create your own such patterns by
altering, amongst other things, the ring and wheel sizes, the hole position
and the colour used.

Double click on the !Spiro icon in a directory viewer, or run the program from the RISC User menu system, and the application will install itself on
the icon bar. Clicking on this icon will bring up the main window and the
values window. The main window, which is not opened at full size,
contains a 1000 by 1000 unit sprite in the current mode. On top of the
sprite, the ring, and the wheel which rolls inside it, are drawn. The
small black square, on a diameter of the wheel, marks the position of the
'pen'. If you click on the OK icon at the bottom of the values window, you
can see the program in action - drawing a simple five pointed star. Now
try altering the values in the window either by using the arrow icons or by
typing in a new value. A full explanation of all the effects of these
values follows.

The first line of the window sets the x and y coordinates of the centre of
the ring. Note that the arrow icons move these values up and down by 16
units at a time, though any intermediate value can be entered. The next
values, the sizes for the ring and the wheel, refer to their circumferences
- in the real world, this is the number of teeth they have. It is the
relationship between the sizes of the ring and the wheel that determines the
type of figure that is drawn. Note that physical impossibilities are
permitted - a wheel can move 'inside' a ring that is smaller than itself.

The next value is the hole number that is to be used. As mentioned, the
spirograph wheel has, in the real world, holes at different distances from
the centre, in which to place a pen. An indication of how many holes there
are from the edge to the centre is also given though again this limit is not
enforced. Beneath this, the wheel offset may be set, which determines the
starting point of the wheel around the ring.

You may, by first clicking on the adjacent option icon, also alter the
number of rotations that the wheel will make before coming to a stop.
Normally the computer will calculate (using Euclid's algorithm on the current
ring and wheel sizes) the number of rotations required for the pattern to be
completed. This value is also displayed to the right should you wish to
make use of it. For example, the first half of the rotations could be
done in one colour, then the pattern could be finished in another.

The window also contains icons which let the wheel run outside the ring, and
other icons for enabling the current colour to be chosen. When you have
completed all the changes you wish to make click on OK to see the pattern
they create. A temporary dialogue box is opened while the figure is being
drawn which reminds you of the values currently being used as well as
indicating how many rotations have been completed so far. The Abort and
Pause icons at the bottom should be self-explanatory.

Pressing Menu over the sprite window brings up the application menu.
The first entry shows the standard Info box while the second entry, Save
allows the pattern to be saved as a sprite file. Previously saved patterns can be loaded into Spiro by dragging them to the icon bar icon or to the window.

The third entry
Values... (re)opens the values window. The next two entries, Ring/wheel
and Fast permit the ring and the wheel to be hidden from view and the
speed of drawing to be changed respectively. The last entry, Clear, as
its name suggests, will clear the current pattern allowing you to start
afresh.

An example file containing several patterns has been included to show what may be acheived. The
way in which they are created is described below in order to give an idea of
how you may produce your own interesting patterns.

The pattern at the bottom left uses ring 96 and wheel 60. Start at wheel
offset 0, and draw four figures using holes 4 through to 7, alternating
between orange and yellow for each hole. Then repeat this at offset 6,
this time switching between the colours of dark and light blue. Lastly,
change the wheel size to 72 and draw light green figures using both holes 4
and 5 at offsets 3, 9, 15 and 21.

The pattern at the bottom right needs ring 105 and wheel 52. Using hole 4,
starting at offset 0, draw 35 rotations in blue (remember you need to
click on the option icon before you can set the number of rotations). Then
follow this by another 35 rotations in cyan (light-blue) and then do the
last 35 rotations in dark green (it is probably best to unset the option
icon now, otherwise 35 rotations will be enforced on all future figures).

The top left pattern, which is more complicated, uses ring 105 and
wheel 75, starting with a figure in colour blue at offset 0 with hole 4.
Now draw two more using hole 5 at offsets 1 and -1. Then change to colour
red and use holes 6, 7 and 8 at offsets 2 and -2, 3 and -3, and 4 and -4
respectively. The pattern is finished in a similar manner using blue with
holes 9, 10 and 11 at offsets 5 and -5, 6 and -6, and 7 and -7.

The top right pattern is somewhat simpler. Use ring 105 and wheel 63, and
draw figures in cyan using holes 4, 6 and 8, in red using holes 10, 12 and
14, and blue using holes 16, 18 and 20.


Copyright  RISC User 1994