Each page of your LogoWriter scrapbook contains a shapes editor
that may be used to create special graphics effects. The shapes editor
is accessed by typing the command shapes in the command center. Pressing
<RETURN> while in the shapes editor returns you to the page you were
working on. The Macintosh version of LogoWriter has thirty shapes already
available in the shapes editor, numbered 11 through 40, with provision
for creating and storing sixty more. Select a shape by clicking on it with
the mouse. You may use the mouse to draw new shapes or change existing
shapes, as instructed by the shapes editor. When you save the page, the
new shapes you created for that page are also saved.
A shape is like a costume worn by the turtle. The turtle is dressed in a new shape with the instruction setsh shape.number where shape.number is the identifying number from the shapes editor. Shapes may be used to decorate the page by choosing a shape and moving the turtle with the mouse or with Logo instructions to the place where you would like to display the shape. When the turtle reaches the desired location, type the commands pd and stamp.
Another way to locate the turtle on the page in preparation for stamping a shape is to use a setx, sety, or setpos command. To understand these commands, imagine that the turtle sees the page as a sheet of graph paper with an x-axis and a y-axis intersecting at her home position. This point of intersection is labelled (0, 0) - the "origin" of the graph. Horizontally along the x-axis, points to the right of the origin are numbered in positive turtlesteps from 1 to 247 and to the left from -1 to -247. Vertically along the y-axis points above the origin are numbered from 1 to 110 and below the origin from -1 to -110. These numbers are called the x-coordinates and the y-coordinates of the page, respectively. The commands setx and sety require one of these coordinates as an input and move the turtle horizontally or vertically to that location. The command setpos requires a list of two coordinates, the x-coordinate and the y-coordinate, as an input and moves the turtle directly to that location.
To erase a shape that has been stamped, move the turtle to the exact location of the shape and type the commands pe and stamp. The command pe (pen erase) prepares the turtle to stamp over the shape using the background color of the page, thus making the original shape invisible. If the turtle were originally positioned with the mouse rather than with Logo commands, it is sometimes tricky to relocate her exactly on top of the shape. It is often easier in this case to change the turtle's costume to shape #11, a large rectangle, before stamping over the original, smaller shape. Shapes may also be used to decorate the inside of a closed figure by choosing the desired shape, moving the turtle inside the figure, and typing the command shade. shade works just like fill, except that the interior is filled with copies of the shape instead of with a solid color.
Text may be included in a graphic design by pressing <COMMAND> 8 (hold down the COMMAND key and type 8.) . This activates the label mode cursor in the bottom right corner of the page. The cursor may be moved with the arrow keys to the location where you wish to enter text. The letters you type are displayed as graphics characters rather than as text. You may erase graphic characters by pressing the <DELETE> key, provided the cursor remains on the same line as the text to be deleted. If you have moved the text cursor to a different line, the only way to erase a character is to place the cursor under the character and type it over. Pressing <ESC> leaves label mode and reactivates the cursor in the command center.
Another way to enter graphic text on a page is with the instruction
label [text to be entered] The list of graphic characters will be copied
on the page starting at the turtle's position. Typing the command cg
will erase all the graphic characters from the page, along with stamped
shapes and drawings.
setsh (set shape) shape.number Changes the turtle's shape to the one specified by the shape number from the shapes editor.
stamp Imprints the turtle's shape on the page at her current location.
shade Fills a closed figure with copies of the turtle's shape.
setx x-coordinate Moves the turtle horizontally to the location specified by the x-coordinate number. The expression may be a numeral or a reporter with inputs.
sety y-coordinate Moves the turtle vertically to the location specified by the y-coordinate number. The expression may be a numeral or a reporter with inputs.
setpos list.of. two.coordinates Moves the turtle to the location specified by the x- coordinate and the y- coordinate. The expression must be a list of two numerals.
label list.to-be.displayed Displays the input value on the page as graphic characters, starting at the label cursor's position.
wait ticks Delays the execution of an instruction for
a time interval specified by the input number. 50 ticks delays the instruction
for about one second.
1. Experiment with all these new commands, choosing shapes numbered 11 through 40. After giving the turtle a new shape, you may locate her in preparation for stamping by dragging with the mouse, by using a setx, sety, or setpos command, or with the usual fd, rt, and lt commands.
2. Experiment with creating new shapes by clicking on a blank shape and then using the mouse in the editor to draw a new design. Use this shape just like one of the originals.
3. Using the repeat command, along with pu and pd, stamp a shape several times in a straight line across the page
4. Using the Copy and Paste features of the shape editor, duplicate
shape 12 in positions 1 through 8. Edit each of these copies by drawing
the hands of a clock as it moves from noon to 12:07, to 12:15, to 12:22,
to 12:30 and so on until it gets back to the top. Now write a repeat instruction
with a quoted list of instructions that stamp each of these shapes in turn.
You will have to add the new instruction wait 10 between each stamp in
order to slow down the action and produce the proper effect when the Interpreter
executes the repeat instruction.