File: SolidviewsTutorial.tioga
Author: Eric Bier on January 18, 1985 3:39:13 pm PST
Last edited by Bier on June 19, 1985 10:46:35 pm PDT
Solidviews Tutorial
Some example sessions with Solidviews.
To run solidviews:
Make yourself a Solidviews subdirectory and CD to it.
Bringover -p /cedar/cedarchest6.0/top/solidviews.df
Solidviews
Session 1: The table.
Solidviews automatically creates a single empty viewer. Notice that the top says Front View of ///SomeDirectoryName/NoName.pic. This means that you are looking at your (empty) scene using a predefined camera position called "Front".
Let's build a table with a thin block for the table top and two thick blocks for legs.
Building a Tree: All objects which we make will be descendants of a composite object called the sceneAssembly. Hence, our table will be a child of sceneAssembly. Our table, in turn, will be a composite object made of a tabletop, a left leg and a right leg (i.e. tabletop, leftLeg, and rightLeg will be children of table). We build a tree from the top down.
Notice that the word "sceneAssembly" is in the "Parent:" slot of the EditTool. Click "New:" on the same line and type "table". Click Add Composite!. Our scene now contains a composite object table which has no subparts. Select the work "table" and click the Parent! button which has a box around it. The word "table" should appear next to Parent:. We are now ready to add the other parts of our table.
Adding Blocks: Click "New:" and type "tableTop" next to it. Click "x, y, z:" next to Add Block! in the 3rd EditTool section. You are now ready to type in the size of a block (x, y, and z dimensions) where 72 = 1 inch. Type in 360, 10, 160. Click Add Block!. A block should appear in your viewer.
Cameras: To list all Solidviews cameras, click the ListCameras! button in the 5th section of the solidviews EditTool. To examine the data for a particular camera, select the name of the camera and Click Get! in the 6th (Camera) section of the EditTool. To look at the scene from a different position, select a camera name and click Use!. For now, select the word UpRight and click Use! Note that the header of your 3D viewer now says "UpRight View of ///SomeDirectoryName/NoName.pic".
Adding More Blocks: Click "New:" and type "leftLeg" next to it. Again click "x, y, z:" next to Add Block!. This time type 30, 150, 160. Again click Add Block!
Translating an Object: Select the word leftLeg and click the Source! button which has a box around it. The leftLeg block is now selected. We will translate the leftLeg by -165 units in x to make it flush with the end of the tableTop and by -80 units in y to put it under the table. Click "X, Y, Z:" next to Translate. Type -165,-80,0. Click Translate! with the left mouse button. Notice that if you click with the right mouse button, you undo the translate. Redo it again with the left.
The Last Block: Click "New:" and type "rightLeg" next to it. Click Add Block! Click KillSelections! in the 3D viewer to deselect the leftLeg. Click "X, Y, Z:" next to Translate and type 165,-80,0. Select the word "rightLeg" and click the Source! button which has a box around it. The rightLeg is now selected. Click Translate! with the left mouse button.
Parallel view: This is a pleasant persective view of the table. To get a parellel projection, try this. Select the word "Front" and click Get! in the 6th EditTool section. Again select the word "Front" and click Use! Two lines down from the Use! button is the word "projection:". Click this word until "ortho" appears. Now click Set!. The table is now shown using parallel projection. It appears bigger because with persective its projection is smaller. The parellel projection appears "actual size".
Saving the scene: Type a name for the scene (i.e. "table.pic") anywhere you like. (The Text: line of the 3D viewer is useful for this). Select the text and click Store (in the 3D viewer menu) twice. Your picture will be saved in the same directory in which solidviews was started. You can retrieve your scene later by selecting its name and clicking the Get button in the 3D viewer menu. You can get a new empty viewer by clicking New Viewer! on the top line of the EditTool.
Session 2: The Potted Plant
A Fresh Viewer. Get a fresh 3D viewer by double clicking "Clear!" in the 3D viewer menu (alternatively, click "New Viewer" at the top of the EditTool.
Trees Again. Let's build a potted plant which is made up of a rose and a pot. As in Session 1, type a name (e.g. "pottedPlant") next to "New:" in the EditTool. Make sure that "sceneAssembly" is next to "Parent:". Click Add Composite! Select the word pottedPlant and click the Parent! with a box around it -- "pottedPlant" should appear next to "Parent:".
Before going on to Session 2, Click Clear (at the upper left corner of the 3D viewer) twice.
We will build a composite object "pottedPlant" consisting of "rose" and "pot".
Trees again. Copy or type "sceneAssembly" into the "Parent:" slot of the EditTool. Type "pottedPlant" next to "New:" in the EditTool. Click "Add Composite!" in the EditTool. Select the word "pottedPlant" and click the "Parent!" key with the box around it. "pottedPlant" should appear
in the "Parent:" slot. We are ready to add rose and pot.
Adding a revolute sweep. Open the icon which has crosshairs on it. The resulting viewer will say "Scratchpad2d" in its header. Grow it to take up the whole column. Click "NewRevo" in the Scratchpad menu. This puts us in "mirrored" mode. Move the mouse around in the viewer, clicking
the left button. Notice that you are designing a polygon with mirror symmetry. Click "NewRevo" again to start over. Design a polygon which looks like the silhouette of a rose. Remember that the
flower has both an inside and an outside (give the petals finite thickness). You can move points around by pointing to them and holding down the middle mouse button. To splice a point into an existing edge, hold down CTRL and left click. Right clicking over a point deletes it. When you like your rose, open the EditTool again. Type "rose" next to "New:" and click "Add Revolute". A shape should appear in your 3D viewer.
And another. To add the flower pot, open the Scratchpad again and click NewRevo. Design a flower pot (preferably centered on the scratchpad crosshairs). Don't forget to give it an inside and an outside. Open the EditTool. Type "pot" next to "New:" and click "Add Revolute". A flower pot should appear, centered on the same vertical axis as the rose.
A Camera change. As in Session 1, switch to the the UpRight camera.
Moving the pot. It may be that your flower pot intersects your flower's stem. In any case, let's practice moving objects to new locations. Select the word "pot" and click the "Plane!" button with the box around it. A little square and a perpendicular line should appear in the pot. Left click the mouse in the 3D viewer to move the input focus into it again. Hold down R and the left mouse button as you move the mouse in the 3D viewer. Notice that the skitter (3D cursor) is constrained to a line. Now click U. The litte square should rotate 90 degrees. Again hold down R and the left mouse button as you move the mouse in the 3D viewer. This time the mouse is constrained to a different line. Click U a few times until the constraining line is the symmetry axis of the pot. Move the skitter below the pot. Now click T. A Target symbol (a square with axes) will appear at the skitter position. Select the word "pot" and click the "Source!" button with the box around it. A Source symbol (a tiny square with axes) should appear in the pot. Left click the mouse in the 3D viewer to move the input focus into it again. Now click M (for Move). The flower pot should move down somewhat.
Potting the plant. If you have succeeded in moving the pot so that it is entirely below the stem of the flower, then the following operation should move the flower to the bottom of the pot: Click "KillSelections!" in the 3D viewer menu. The Target, Source, and Plane symbols should disappear. Click "DeleteJacks" in the 3D viewer menu. The jack (placeholder coordinate system) should disappear. While holding down the left mouse button, point at the rose. The word "rose" should appear next to "Skitter:" in the EditTool. Click S. A Source symbol should appear in the rose. Then point to the middle of the pot. The word "pot" should appear next to "Skitter:" in the EditTool. Click T. A Target symbol should appear in the pot. Finally click J (for Join). Solidviews casts a single ray from the source to the target and moves objects encountered later to touch objects encountered earlier, like steak and green peppers on a shish-kebab.
To see this effect again, type 0, 200, 0 next to "X, Y, Z:" on the "Translate!" line of the EditTool, select the word "rose" and click the "Source!" button with the box around it. Finally, click "Translate!". The rose should move up a bit. If the refresh is poor, click Erase in the top menu, and Scene in the Draw: menu to refresh the screen. Select the word "pot" and click "Target!". Click in the 3D viewer. Then click J again.
Rotating the whole thing. Again click "KillSelections!". Now point to the pot, holding down the left mouse button, until "pot" appears next to "Skitter:" in the EditTool. Click E (for Extend). "pottedPlant" should appear next to "Skitter:". You have extended your selection from pot to its parent, pottedPlant. Click S. A Source symbol should appear centered on the pottedPlant coordinate system (which is probably coincident with the rose coordinate system at this point). You have selected the entire pottedPlant as a source. Type "10" next to "degrees:" in the EditTool. Click "RotX!" with the left mouse button. The rose and pot should rotate together. You can achieve the same effect by typing the 7 key (7 = RotX(10), 8 = RotY(10), 9 = RotZ(10), SHIFT 7 = RotX(-10) ... ).
We are done. Save your work as in Session 1. Try looking at your potted plant with different camera positions.
Session 3: Making Things Tangent
Before going on to Session 3, Click Clear (at the upper left corner of the 3D viewer) twice.
We will create two blocks, make them tangent, and then make them flush.
Create a block named "lawn" with dimensions 360, 40, 160. Remember to put "sceneAssembly" in the Parent slot first. Create a block named "concrete" with dimensions 90, 40, 160. Use the UpRight camera. Make a source selection on concrete (review Session 2 if need be). Click in the solid viewer (or on the word Selected in the solid viewer if you do not wish to disturb your cursor position).
Dragging Parallel to the Screen. Hold down the F key and the left mouse button. As you move the mouse, concrete will follow it, moving parallel to the film plane, (i.e. the screen plane). F is mnemonic for Film-Drag). Drag the film so it appears below lawn on the screen.
Pointing at the backs of things. Holding down the SHIFT key and the left mouse button, point at concrete. The z axis of the cursor gives you a hint that you are pointing to the back of the block. Select a point on the back-most edge. After releasing all buttons, type SHIFT-S. SHIFT-S selects concrete as a Source. and leaves a special placeholder coordinate system (called a jack) on its surface. This jack will be used as a Tugboat when we dock concrete with lawn.
Pointing at the front as usual. Holding down the left mouse button, select a point on the front-most surface of lawn. Release all buttons, and then type SHIFT-T. SHIFT-T selects the lawn as a Target, and leaves a jack on its surface. This jack will be used as a Dock when we dock concrete with lawn.
Move to tangency. Click M (for Move). Concrete should move up to lawn.
Improving alignment. KillSelections. DeleteJacks. Source-select concrete by pointing at it (with left mouse button) and clicking S. Target-select lawn by pointing at it (with left mouse button) and clicking T. Click AbutY! in the EditTool. This aligns concrete and lawn in the y direction. Notice that they are now flush at top and bottom.
Using Jacks to improve alignment. KillSelections. Using the Point-at-back operation (SHIFT left mouse), make a Source-selected jack (SHIFT-S) on the left edge of concrete, and a target-selected jack (SHIFT-T) on the left edge of lawn. Notice that the z axes of the two jacks are parallel. We wish to align these coordinate systems in this direction. Click AbutZ! in the EditTool. KillSelections. DeleteJacks. We are done.
For extra fun, make many target-selected jacks all over lawn. Make a single source-selected jack on concrete. Click C (for Copy), or SHIFT-C for (Copy with random scaling and rotation) to create a new block at each target-jack, to produce abstract art. Note: SHIFT-C looks at the first two numbers next to X, Y, Z: on the ScalePrimitive! line of the EditTool, to determine the upper and lower bounds of scaling. Type 0.6, 1.2 next to X, Y, Z to get blocks which are 60% to 120% the size of the original. Also, the random rotation is only around the z axis of the target jacks, so the resulting new blocks will all be tangent to the lawn block.