Copyright: ® 1991-1994 by Daniel S. Baker


Contents

µLathe (MicroLathe) is an easy to use modeling tool that allows you to create three dimensional objects using the metaphor of the carpenter's lathe. To become a registered user, or to obtain the source code for this program, please see the "Registration Information" topic below.

Procedures

Creating a 3D Object

Viewing a 3D Object

Using the Control Panel

Menus

File Menu Commands

Edit Menu Commands

View Menu Commands

Registration

Registration Information


Creating a 3D Object

The Lathe view is used to create the outline of an object. This outline will be spun 360 degrees in lathe fashion about its axis to create a three-dimensional object.

Let's say you want to model a bottle. Imagine the bottle laying on its side. The top half of the bottle's contour is the shape that will be entered into the µLathe window. Start at either the left or right side of the object, and click the mouse at various points along the contour of the bottle. Each time you click, a new endpoint is added to the outline, and a line segment will be drawn between the last two endpoints entered. Continue in this manner until your object attains the desired shape. The outline of your bottle might look something like this:

When the mouse is moved directly over a handle, the cursor becomes a circle, indicating that the endpoint beneath can be moved if the mouse button is pressed and held.

The cross-hair cursor indicates that a new endpoint and line segment will be added if the mouse button is clicked.

Note: Holding the Ctrl key down while the mouse button is pressed will cause the new or existing endpoint to be snapped to the nearest gridpoint.


Axis

In the Lathe view, the axis of an object is the bottom edge of the µLathe window.


Handle

The large dot at each endpoint of an object outline.


Viewing a 3D Object

After creating the outline of an object in the Lathe view, select the 3D option from the View menu, or click the View button in the Control Panel. Your outline will be rotated 360 degrees about its axis to produce a 3D object. Using the Control Panel, you can change the position and appearance of your object.

The graphic below shows three views of an object. Click on the figures below to see a description of each view:

See also:

Creating a 3D Object, Using the Control Panel


Object Outline (Lathe View)

Figure (a) shows a typical outline, in this case, a light bulb.


Wire Frame Object (3D View)

Figure (b) shows the outline of the light bulb (a) rotated around its axis, creating a wire frame object.


Shaded Object (3D View)

Figure (c) depicts the object after rotation and constant shading have been applied using the Control Panel.


Using the Control Panel

The Control Panel allows you to change several parameters that govern the appearance of your 3D object. Click on any item in the Control Panel to view a description of its function.


System Menu

This menu allows you to move or close the Control Panel.


Title Bar

Click and hold the mouse button in the title bar to move the Control Panel.


Model List

Allows you to select the way your object will be rendered. The options are:

Wire-frame

Hidden

Constant

Gouraud.


Wire Frame

In this rendering mode, each surface of your 3D object will be outlined in a solid color; the interior is left transparent.


Hidden

In this rendering mode, each surface of your 3D object will be outlined in a solid color; the interior is filled to eliminate hidden lines.


Constant

In constant shading mode, a color value is calculated for each surface based on the surface's orientation, the color of the object, and the color of the light source. The entire surface is filled with that color.


Gouraud

In Gouraud shading, a color value is calculated for each vertex of a surface based on the surface's orientation, the orientation of each surface that shares the vertex, the color of the object, and the color of the light source. The color values for interior pixels are interpolated to yield a smooth shading effect.

Rendering an object in this fashion can take a considerable amount of time, especially on computers lacking a math co-processor. Be prepared for a lengthy delay if your object is complex.

Note: Gouraud shading requires at least 256 colors. It is not effective on 16 color video systems.


Slices List

Allows you to select the resolution of your 3D object. The number of slices represents the number of surfaces generated around the object's axis.

Note: This control does not change the number of surfaces generated lengthwise along an object's axis; that number is dependent on the number of endpoints specified in the Lathe view outline.


X Rotation - Positive

Rotates your object positively about the X axis. The amount the object rotates is dependent on the setting of the Rotate scroll bar.


X Rotation - Negative

Rotates your object negatively about the X axis. The amount the object rotates is dependent on the setting of the Rotate scroll bar.


Y Rotation - Positive

Rotates your object positively about the Y axis. The amount the object rotates is dependent on the setting of the Rotate scroll bar.


Y Rotation - Negative

Rotates your object negatively about the Y axis. The amount the object rotates is dependent on the setting of the Rotate scroll bar.


Z Rotation - Positive

Rotates your object positively about the Z axis. The amount the object rotates is dependent on the setting of the Rotate scroll bar.


Z Rotation - Negative

Rotates your object negatively about the Z axis. The amount the object rotates is dependent on the setting of the Rotate scroll bar.


Reset

This button cancels any rotations applied to the object and returns it to its default position.


Rotate

This scroll bar allows you to change the number of degrees your object is rotated about the X, Y, or Z axis per rotate button click.


Scale

This scroll bar changes the size of your 3D object relative to the size of the outline in the Lathe view.


Distance

This scroll bar modifies the apparent distance of  the viewer (i.e. you) to the 3D object, allowing you to create the illusion that the object is being viewed at extremely close range, or from very far away. Note that the size of the object does not change; only the way the object is drawn.


Gouraud Detail

This scroll bar changes the level of detail in Gouraud shading mode. At the lowest setting, each surface is blended with every adjacent surface. At a medium setting, only surfaces that adjoin at shallow angles will be blended; surfaces that adjoin at sharp angles will not be blended. At the highest setting, Gouraud shading is effectively disabled.

Take a look at some of the sample objects provided with µLathe. The CHAMPAGN.LAT file, for example, contains a champagne glass. This glass would be a good candidate for complete Gouraud shading (a Detail setting of zero), since it contains no sharp corners. However, the light bulb, BULB.LAT, would not, since the detail of the bulb's "threads" would be destroyed by complete Gouraud shading. This detail can be preserved by setting the Detail slider to a high value, something in the mid 700's or thereabouts.

There is no magic number! The proper setting will depend on many factors, including the shape, size, and orientation of the object, and can only be realized through experimentation.


Gouraud Texture

This scroll bar allows you to add texture to your 3D object. The higher this control is set, the rougher the surface of an object becomes. This control works only in conjunction with Gouraud shading.


Object Color

Activating this radio button allows you to change the color of the object using the Red, Green, and Blue scroll bars below.


Light Color

Activating this radio button allows you to change the color of the light source using the Red, Green, and Blue scroll bars below.


Red

Allows you to change the red component of the object or light source color.


Green

Allows you to change the green component of the object or light source color.


Blue

Allows you to change the blue component of the object or light source color.


Color

This box displays the current color of either the object or the light source depending on whether the Object color or Light color radio button is selected.


View

Alternates the current mode between the Lathe view and 3D view.


Repaint

Causes your 3D object to be re-rendered. This button performs the same function as the Repaint command in the Edit menu.


Light Source

This dialog box allows you to change the position and intensity of the light source. Click on a control in the dialog box to view a description of its function.


Light Source Positions

The light source can be assigned one of eight positions around the object.


Light Source Distance

The distance from the light source to the object can be modified using this scroll bar.


Light Source Intensity

This scroll bar allows you to change the intensity of the light source.


Ok

This button accepts any changes made to the light source in the dialog box.


Cancel

This button cancels any changes made to the light source in the dialog box.


File Menu Commands

New

Open

Save

Save As

Save Image

Save Sequence

Exit


New

This option clears any existing object a prepares the program for the creation of a new object. If there is an unsaved object, you will be given the opportunity to save your changes.


Open

Opens a lathe object saved on disk. If there is an unsaved object, you will be given the opportunity to save your changes.


Save

Saves the current lathe object to disk.


Save As

Saves the current lathe object to disk under a new file name.


Save Image

Saves a bitmapped image of the 3D object to disk. Currently, two bitmap file types are supported, BMP and TGA. Using the list box at the right of the Save Image dialog box, you may specify the resolution of the bitmapped file in bits-per-pixel. The recommended setting will be hilighted.

Note: There is no advantage in saving a bitmapped file in a resolution higher than the recommended resolution; the image quality will not change, but the resulting file will be considerably larger. Specifying a resolution lower than the one recommended will result in a loss of color accuracy.


BMP

The standard Windows bitmap format.


TGA

The Targa image file format. Currently, only 24-bit TGA files are supported.


Bits-Per-Pixel

The number of bits which comprise the color information for a single pixel of a bitmapped image. The number of possible colors in an image is 2 to the nth power, where n is the number of bits per pixel.

1 bit - 2 colors (Monochrome)

4 bit - 16 colors (VGA)

8 bit - 256 colors (Super VGA)

24 bit - 16 million colors (True-color)


Save Sequence

This option allows you to save multiple views of your 3D object in a single Windows DIB file. These bitmaps can be displayed in animated fashion by the Autodesk Animator Player for Windows, or by the MiniMovie application bundled with µLathe.

When selected, you will be prompted for a DIB file name. In the X, Y, and Z rotate fields, enter the number of degrees you wish your object to rotate around that axis per frame. Negative values are allowed. You must also specify the total number of frames for the sequence.

Example: The graphic below depicts a sequence generated with the "Save Sequence" command. At the time the command was selected, the 3D object, a bottle, appeared as in frame #1. The sequence was created using a value of 60 for Y rotation (60º positively about the Y axis), zero for X and Z rotation, and 6 for the number of frames. Note that because the bottle was rotated about a single axis, and because 60º times 6 equals 360º, the bottle makes one complete revolution about the Y axis.

Note: Even though the sequence operation has been greatly accelerated in this new version, the process can take a long time if your object is complex, or the number of frames you request is large. The sequence can be aborted by clicking the mouse button in the µLathe window. The µLathe program must be in the foreground for sequencing; don't switch to another application while the sequence is in progress.


DIB

Device Independent Bitmap; a Windows format for graphic images.


Exit

Exits the µLathe application.


Edit Menu
Edit Menu Commands

Undo

Copy

Clear

Grid

Light Source

Repaint


Undo

Undoes the previous endpoint insertion or endpoint move.


Copy

Copies the contents of the µLathe window to the clipboard. On paletted video systems (generally all 256 color systems), the palette is copied as well. Note that when the "snapshot" is taken, the Control Panel window will disappear momentarily if it covers any part of the µLathe window.


Clear

Erases all endpoints in the current lathe object, while keeping the Control Panel settings and file name intact.


Grid

Allows you to create a grid of evenly spaced points in the Lathe view. Using the Ctrl key, you can force endpoints to be aligned (snapped) to the gridpoints.


Repaint

This command causes the 3D object to be completely re-rendered. This command performs the same function as the Repaint button in the Control Panel.


View Menu

Lathe

3D

Control Panel


Lathe

Changes the current mode to the Lathe view, where objects are edited.

See also:

Creating a 3D Object


3D

Changes the current mode to the 3D view, where 3D objects are rendered.

See also:

Viewing a 3D Object, Using the Control Panel


Control Panel

This command hides the Control Panel if it is currently displayed, or displays it if it is currently hidden.

See also:

Using the Control Panel


Registration Information

A $15 donation for the use of this product will be graciously accepted, for which you will receive an authorized copy of µLathe on diskette.

If you are a Windows programmer, $30 will get you the aforementioned registration, plus the complete C-language source code to this program. Send check or money order (US funds only, please) to the author at the address below:

Daniel S. Baker

P.O. BOX 141498

Columbus, Ohio, USA 43214

Feel free to contact me on CompuServe:

71551,2300


Printing

At this time, the µLathe application does not support native printing. To output an image to a printer, you must use the "Save Image" command to save an image of your object to disk. Then import the image file into an application which supports printing, such as Paint Shop, a shareware utility from JASC Inc., or Aldus PhotoStyler, a commercial product.

See also:

Save Image