Next: Interaction, Previous: Overview, Up: Top
This chapter leads you through some of the basics of using Geomview. Work through this chapter in front of a computer where you can try out the examples given here to get a feel for what you can do with Geomview.
To start Geomview, login to the computer and get a shell window. A shell window is a window in which you can type unix commands; the prompt in the window usually ends with a '%'. In the shell window (the mouse cursor must be in the window) type the following (<Enter> here means hit the "Enter" key):
geomview tetra dodec <Enter>
This command starts up Geomview and loads two example objects, a tetrahedron and a dodecahedron. After a few seconds three windows should appear; see Figure.
The panel on the left is Geomview's main control panel; it's called the Main panel. The skinny panel in the middle is the Tools panel and is for selecting different kinds of motions. The window on the right is the camera window and in it you see a large tetrahedron and a dodecahedron which is partially obscured by the tetrahedron.
Geomview has lots of panels but by default it displays only these three. We'll describe some aspects of these and a couple of the others in this tutorial. You can read more about these and other panels in the later chapters of this manual.
Put the mouse cursor in the camera window and press down and hold the left mouse button. Now, while holding down the button, slowly move the mouse around. You should see the picture rotate in the direction you move the mouse. If you lift up on the mouse button while moving the mouse, the picture continues rotating. To stop it, hold the mouse very still and click down and up on the left mouse button.
Geomview uses the glass sphere model for mouse-based motion. This means you are supposed to think of the object as being inside an invisible sphere and the mouse cursor is a gripper outside the sphere. When you hold down the left mouse button, the gripper grabs the sphere; when you let go of the button, the gripper releases the sphere. Moving the mouse while holding the button down causes the sphere (and hence the object) to move in the same direction as the mouse.
In addition to the two solids you should also see two wireframe boxes in the camera window. These are the "bounding boxes" of the two objects. By default Geomview puts a bounding box around each object that it displays so that you have an idea of how large it is.
Notice that as you move the mouse around the tetrahedron and dodecahedron move as a unit. That is because by default what you are actually moving is the "World". To move an individual object instead of the whole world, move the mouse cursor to the Targets browser in the Main panel. Click (any button) on the word tetra. This makes the tetrahedron be the "target object". Now move the cursor back to the camera window and you can rotate just the tetrahedron.
The motion that you have been applying up to now has been rotation, because that is the motion mode that is selected in the Tools panel. To translate instead, click on the Translate button. Now when you move the mouse in the camera window while holding down the left button, the tetrahedron (which should still be the target object from before) will translate in the direction you move the mouse. Notice that you can translate it beyond the edge of the window as long as you keep holding the left mouse button down. If you lift up on the mouse button while moving the mouse, the tetrahedron will keep going. It moves rather rapidly so it is very easy to lose track of where it is.
If you accidentally lose the tetrahedron by translating it too far out of the view of the window, you can get it back by clicking on the Center button in the Tools panel. This causes it to come back to its initial position.
Click on the Center button to bring the tetrahedron home, and then translate it off to one side so that you can completely see the dodecahedron.
Your world now has two objects in it that are beside each other. You should see the dodecahedron in the middle of the window and maybe part of the tetrahedron off to one side. Go back to the Targets browser in the Main panel and click on "World" to select the whole world again. Now click on the Look At button in the Tools panel. You should see the dodecahedron and the tetrahedron in the middle of the window next to each other (see Figure). The Look At button positions the camera in such a way that the target object is centered in the window.
Now put the cursor over the middle of the dodecahedron and double-click the right mouse button. This means click it down-and-up two times in rapid succession. Notice that the dodecahedron becomes the target object; you can see this in the Targets browser in the Main panel. Double-clicking the right mouse button on an object is another way to make it the target object. Go to the Inspect menu at the top of the Main panel and select Appearance. This brings up the Appearance panel. When it appears, if it partially obscures another Geomview window you can move it off to one side by dragging its frame with the middle mouse button down.The Appearance panel lets you control various things about the way Geomview draws objects. Note the buttons labeled [af] Faces and [ae] Edges. Click on the [ae] Edges one, and notice that Geomview is now drawing the edges of the dodecahedron. Click on it again and the edges go away. Click several times and watch the edges come and go. When you've had enough of this, leave the edges on and click the [af] Faces button. This toggles the faces on and off. Click the button again to turn them back on.
Now click on the [Cf] Faces button under the word COLOR. A color chooser panel should appear (see Figure).
Note the three sliders, H, S, and V, controlling the color's hue, saturation, and value (lightness). Clicking the HSV button gives a different set of sliders, one each for red, green, and blue. Numerical values for both RGB and HSV color systems can be seen or edited at the bottom of the panel. The dodecahedron's previous colors were specified in the file dodec that you loaded when we started Geomview. The color that you specify with the color panel overrides the old colors. You can adjust the intensity of the color with the Intensity slider. When you find a color that you like, click the Done button.
Now put the cursor somewhere over the gray background and double-click the right mouse button; this picks "World" as the target object. Click the Look At button to look at the world again.
Notice that in the Appearance panel the settings of the buttons have changed from the way you left them with the dodecahedron. That's because the Appearance panel always displays the settings for the target object, which is now the world, which still has its default settings.
Click on the [ab] BBox button under the word Draw. The bounding boxes go away. Now put the cursor back in the camera window. At the keyboard, type the keys a b. Notice that the bounding boxes come back. a b is the keyboard shortcut for the bounding box toggle button; the string "[ab]" appears on the button to indicate this. Most of Geomview's buttons have keyboard shortcuts that you can use instead if you want. This is useful once you are familiar with Geomview and don't want to have to move around among lots of panels.
Now select the tetrahedron, either by double-clicking the right mouse button on it, or by selecting "tetra" in the Targets browser. Then click on the Delete button in the Main panel. The tetrahedron should disappear. This is how you get rid of an object.
You can also load objects from within Geomview. Click on the File menu in the Main panel and choose Open. The Files panel will appear. Below the middle of this panel is a browser with three lines in it; the second line is a directory with lots of Geomview example files in it. Click on that second line; see Figure. Scroll down in the list of files until you see tref.off. Click on that line, and then click on the Add button. A large trefoil-shaped tube will appear in your window. Click the Done button in the Files panel to dismiss the panel.
Now click on the Reset button in the Tools panel. This causes everything to return to its home position. You should see a dodecahedron and a trefoil knot (see Figure).
Play around with the trefoil knot and the dodecahedron. Experiment with some of the other buttons in the Tools panel. Try coloring the trefoil knot with the Appearance panel.
For a tutorial on how to create your own objects to load into Geomview, see file doc/oogltour distributed with Geomview. The things in that file will be incorporated into a future version of this manual.