Geometer is conceptually drawing on any combination of 32 layers, numbered from 0 through 31. By default, it draws on all 32 of them. Any object can be drawn on any combination of layers.
By default, the layer control commands are not visible. You can see them by choosing the Show Layers command in the Edit pulldown menu. You can also change the setting in your options file so that they are always displayed. To set your options, use the Set Options command in the Edit pulldown menu.
The user can view any combination of layers. By default, all the layers are visible, so you can see everything.
When you step through a proof or other demonstration, however, the situation changes. When you press the Start button, Geometer sets it so that you're only viewing layer number 0. Every time you press Next Geometer advances to display only the next layer, so you'll view layer 0 only, then only layer 1, then layer 2, et cetera. Similarly, Prev goes to the previous layer. The Off command paradoxically turns on all the layers. It has the strange name since most users will not see the layer commands displayed, and will think of the Off command as turning off Geometer's proof mode.
In the lower part of the command area there's a little array of 16 buttons numbered 0 to 15. If they are checked, the corresponding layer is active. Active means that you are currently viewing that layer, and if you are creating new geometric items, they will only be visible on that combination of layers.
Only the state of first 16 layers are displayed in the control panel; the others are there, and function, but almost no diagrams need to use the higher numbered layers, and they can be accessed using the text editor. To change the active layers among the first 16, simply click on the buttons to toggle them on or off. There's a shortcut available too---if you hold the Alt key down when you click on a layer, it toggles the state of that layer and all the ones beyond. That way it's easy to turn off or on all the rest of them.
It takes a bit of practice to get good at using the layers, but the proper way to program a proof or demonstration is to make sure that just the "right" things appear on each layer. You can look at some of the sample proofs, such as Ninepoint.T to see how it's done.
Some things, like the basic diagram, will appear on all layers. Things that appear only for a part of the proof, like construction lines, textual descriptions, et cetera, will appear on only one or a few layers. If you want to emphasize something at one stage, but then have it go back to a normal presentation for the rest, you can enter two versions of it, perhaps in different colors. For example,
line1 = .l.vv(v1, v2, .l0, .l2on, .blue); line1blink = .l.vv(v1, v2, .l1, .blink);has two copies of exactly the same line which connects the points v1 and v2. On layer 0 and from layer 2 through 31 (that's what .l2on means), the normal version is shown in blue. But on layer 1, the same line is shown in a blinking color. Presumably there's some text on layer 1 pointing out the significance of this line during that stage of the proof. If the situation is more complicated than this, however, your best bet is probably to use layer colors, discussed later.
Geometer interprets a line as follows: If there are no layer commands, Geometer assumes that the object appears on all layers, 0-31. If any layer command appears, the assumption is that no layers are shown except the ones listed. Thus:
v = .v.ll(line1, line2, .l3, .l7);will appear only on layers 3 and 7.
A very common situation is that you'd like to have an object appear from a certain layer on to the end. For that reason, you can use commands like: .l7on which means that the object in question appears on layer 7, and then on every layer after that. You can mix these with other layer commands to get things like this:
line1 = .l.vv(v1, v2, .l0, .l5, .l8on);This line will appear on layers 0, 5, and 8, 9, 10, ... , 31.
Another situation that commonly occurs is that you'd like something to remain visible from the beginning for a while, and then disappear. For that the "opposite" command also exists. .tol7 as a layer specifier means that the primitives appear on every layer up to and including layer 7.
If you type in overlapping layers, when Geometer writes the file, it will simplify it as much as possible. For example, if you type in:
pnt = .v.ll(line1, line2, .l0, .l1, .l5, .l7, .l8on, .l19);and then you save the file, you'll find that Geometer has written something like this:
pnt = .v.ll(line1, line2, .tol1, .l5, .l7on);
Finally, if you're writing a proof or demonstration, you'd like Geometer to begin displaying only layer 0, so that the Next key will do the right thing without requiring the user to press the Start button. For that reason, there's a special layer command that consists only of layer descriptions followed by semicolons to appear in a file to indicate the starting configuration. Typically this will simply be:
.l0;
but Geometer can understand more complex starting configurations. For example, if your file includes:
.l0; .l7; .l21on;
Geometer will start up with layers 0, 7, and 21, 22, ..., 31 visible, although why you'd want to do that is hard to imagine.
Finally, if some strange combination of layers is visible, Next and Prev actually shift the visible layers by one in either direction. In other words, if layers 1, 3, and 7 are visible, a Next will make layers 2, 4, and 8 visible, and a Prev will make only layers 0, 2, and 6 visible. If only layer 1 is visible, Prev will not eliminate it. Similarly, a Next with only layer 31 visible will leave only layer 31 visible.
Although layers work as advertised above, it is often much easier to use layer colors as described in the next section.
For more advice on using layers, see the chapter on Programming Hints.
Many times you would like to have a primitive appear in different colors, or perhaps not appear at all as you advance through the steps of a proof or construction. The best way to do that is with a combination of the layer and color commands. A single example is probably enough to make the whole idea clear:
line = .l.vv(pnt1, pnt2, [3 .in, .blink, 3 .white, .in]);This line that connects pnt1 with pnt2 will appear on all layers, but for the first three layers, layers 0, 1, and 2, it will have the invisible color. On layer 3 it will have the blinking color, on layers 4, 5, and 6, it will have the color white, and then from layer 7 on, it will again have the invisible color.
You don't have to use the multiples, or you can use them in combination with repeated color specifications, so the primitive above is exactly equivalent to:
line = .l.vv(pnt1, pnt2, [.in, .in, .in, .blink, .white, 2 .white, .in]);
although it will be written by Geometer in the previous (simplified) form.
The final color to appear is assumed to be in force for the rest of the layers, so in the case above, after layer 7, the line will always be invisible.
If, in the control panel, not all layers are active and you create a new object, the latest version of Geometer in fact creates the primitive on all layers, but with the layer colors set so that the object will be invisible on all layers except for those that are active. For example, if layers 0, 2, and 3 are active and you create a new point with the current color of red, that point's color specification will be:
[.red, .in, 2 .red, .in]
Similarly, if you change the color of an existing object when not all the layers are active, then the color of that object will be changed only on the active layers. Suppose that the existing object has a color specification of:
[.red, .in, 2 .red, .in]and that the current layer specification is for layers 2 and 5, and that you select the object and click on the color yellow. Only layers 2 and 5 will be changed to yellow, and the resulting object will have a color specification of:
[.red, .in, .yellow, .red, .in, .yellow, .in]