Spiro by Jimmc: Help

Copyright 1996 Jim McBeath

Contents

Overview

This page briefly describes the commands and parameters for Spiro. Some of these commands or parameters may not be available, depending on the security restrictions your browser or viewer enforces. For example, if your browser does not allow local files to be written, then there will be no Save command; if it does not allow exiting, then there will be no Exit command. These conditional commands or parameters are indicated by a the comment "[if security allows]".

Basic Commands

These are the buttons just above the parameter area.
Draw
Begin drawing. If already drawing, start over again.
Stop
If drawing, stop drawing. If not drawing, does nothing.
Save As [if security allows]
Allows you to enter a file name, then saves the current set of parameters to that file.
Load File [if security allows]
Allows you to enter a file name, then loads the parameters from that file to the current set of parameters.
Advanced
Brings up the Advanced window.
Exit [if security allows]
Exits from the applet viewer.

Basic Parameters

These parameters appear in the main window just above the drawing area.

On the right side of the parameter area are the wheel values.

Radius
For each wheel, the radius of that wheel in pixels.
Teeth
For each wheel, the number of steps that wheel makes in order to complete a single revolution. A higher number makes the wheel turn more slowly. A positive number makes the wheel turn clockwise; a negative number makes the wheel turn counter-clockwise. A value of zero disables that wheel.
Offset
For each wheel, the offset of the starting point. An offset of zero means start the point at the top of the circle. A positive offset moves the starting point in the direction of rotation of the wheel. A negative offset moves the starting point in the opposite direction. The units of the offset are the number of teeth. An offset which is the same as the number of teeth is equivalent to zero. An offset greater than the number of teeth is the same as that number modulo the number of teeth.
On the left side of the parameter area are the non-wheel values.
Color
The color in which to draw the pattern. This value can be one of the standard Java color names, or a red,green,blue triplet where each value is between 0 and 255 inclusive, such as 255,0,0 for red or 0,255,255 for cyan. The known color values are: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow. Color names are case-insensitive.
Animate
The animate button lets you see the wheels in action. When you turn this button on, Spiro immediately clears the drawing area and draws the outlines of the wheels. When you press the draw button, the wheels start turning and the line is drawn. You can see how each wheel turns at a constant rate, and how this affects the drawing point. The resulting line is idential to the line drawn with animation turned off. When animation is on, Spiro pauses briefly between each step to slow down the drawing and let you see better what is happening.
The Status Line
Below the Animate button is the status line. In this area Spiro displays status messages, such as "Drawing" when it is drawing, and "Done" or "Stopped" after it has finished or has been stopped.

Advanced Commands

Pressing the Advanced button in the main window brings up the Advanced window. Additional commands appear at the top of that window.
Add Wheel
Adds an additional wheel to the main window. The additional wheel lets you make even more complicated patterns. If the layout of your main window is now not quite right, resize it slightly to force it to relayout.
Remove Wheel
After you have added wheels and decided you have too many, this command removes a wheel from the main window. As with the Add Wheel command, if your main window layout is not correct, resize it slightly.
Done
Removes the advanced window from the screen. The parameters are preserved. Bringing up the advanced window again will allow you to see and edit those values.

Advanced Parameters

Steps
Controls the number of drawing steps executed. If this number is zero, then Spiro automatically calculates the number of steps required in order to draw a full pattern and displays that number to the right of the Steps field. That number is displayed in parentheses if a non-zero number is entered into the Steps field. The default number of steps is the least common multiple of the number of teeth for all active wheels.
Dashes
Allows specifying a dash pattern for the line segments. The pattern is specified as a sequence of positive integers separated by commas. Each number represents the number of steps that are to be alternately drawn or not drawn. For example, the specification "10" specifies a pattern in which alternating groups of 10 steps are drawn then skipped; the specification "10,10,5" will draw 10, skip 10, draw 5, skip 10, draw 10, skip 5, then repeat. Line segments can be different lengths for each step, so the actual length of the drawn or skipped segments will be variable depending on the size of line segments for each included step.
Draw Mode
Java normally does all drawing in a single thread. This has the unfortunate disadvantage that it ignores button presses while drawing is taking place. For example, it ignores the Stop button. On the other hand, in some implementations (such as JDK v1.0), drawing using another thread is about ten times slower than drawing using the synchronous thread. The Draw Mode choice allow you to specify whether or not to use Synchronous drawing. There are two choices for non-synchronous drawing: backing or direct. Direct mode draws directly to the drawing area. This has the advantage of allowing you to see the drawing as it proceeds, a step at a time. If you turn on animation, you should use this mode. Backing mode draws to an off-screen image, then transfers it to the drawing area when it is done. This has the advantage that your image will be instantly refreshed if you cover and then re-expose the drawing area in the main window.
Chain
The chain parameter specifies the location of a parameter file to draw along with the current set of parameters. This allows you to create images composed of multiple single drawings. If a chained drawing itself has a chain, that drawing is also included. The chained item is drawn first, so the current drawing will always appear on top of the chained drawing. Security restrictions may limit the allowable sources for the chain.
Back to Spiro by Jimmc
jimmc July 22, 1996