Creating a Goblet


Table of Contents

Creating a New Database
Creating, Editing, and Copying the Parts of the Goblet
Creating the Goblet Base
Editing the Base
Creating the Goblet Stem
Adding Additional Balls to the Goblet Stem
Editing the Balls of the Goblet Stem
Making the Goblet Basin
Making Regions of the Goblet's Base, Stem, and Basin
Making a Combination of the Regions
Viewing a Data Tree
Raytracing the Goblet
Review

In this lesson, you will:

In this lesson, you will create a goblet similar to the one in the following example.

First, start MGED from the shell prompt. Select File from the menu bar and then New. A dialog box will appear, and it will ask you for a new database name. Type in goblet.g at the end of the path name and click on OK to create the new database. The program should tell you that the database was successfully created and it is using millimeters for its unit of measure.

In order for MGED to know what primitives to raytrace, you must first designate these areas through Boolean operations. In this example, the two Boolean operations used will be the union (u) and the subtraction (-).

To make the stem a region, type at the Command Window prompt: r stem1.r u ball1.s u ball2.s u ball3.s[Enter]

To make the base a region, type at the prompt: r base1.r u base1.s - ball1.s[Enter]

To make the basin a region, type at the prompt: r basin1.r u basin1.s - stem1.r[Enter]

Note that when creating base1.r, we subtracted a primitive shape from another primitive shape. When creating basin1.r, we subtracted an entire region from a primitive shape.

To combine all the regions into one object, you will need to perform one last Boolean operation. At the prompt in the Command Window, type: comb goblet1.c u basin1.r u stem1.r u base1.r[Enter]

This operation tells the MGED program to:

combgoblet1.cubasin1.rustem1.rubase1.r
Make a combinationName it goblet1.cThe combination will be made of a union ofthe region basin1.randthe region stem1.randthe region base1.r

MGED requires a certain logical order to the model data tree so it knows how to raytrace the various elements. In the goblet, the base and basin consist of regions composed of only one primitive shape each. The stem, in contrast, consists of a region composed of the union of three spheres. The three regions were combined to form a complex object.

To view the data tree for this combination, type at the Command Window prompt: tree goblet1.c[Enter]

MGED will respond with:

The name of the overall combination of this design is goblet1.c. It is composed of the three regions: base1.r, stem1.r, and basin1.r. The region base1.r is composed of the primitive shape named base1.s minus ball1.s. The region stem1.r is composed of three primitive shapes named ball1.s, ball2.s, and ball3.s. The region basin1.r is composed of the primitive shape named basin1.s minus the region stem1.r.

Remember that regions define volumes of uniform material. In the real world (and in BRL-CAD), no two objects can occupy the same space. If two regions occupy the same space, they are said to overlap. To avoid having the base and stem overlap, we subtract ball1.s from base1.s when we create base1.r. We also subtract the stem1.r from basin1.s when we create basin1.r. This removes material from one region that would otherwise create an overlap with another. The following figure shows the overlap between ball1.s and base1.s in blue. This is the volume that is removed from base1.r.

To raytrace the goblet using the default material properties of gray plastic, go to the File menu and click on Raytrace. When the Raytrace Control Panel appears, change the color of the background by clicking on the button to the right of the Background Color box and then clicking on the white option in the drop-down menu. Next, click on Raytrace.

When you have finished viewing the goblet from the front view, go to the View option of the menu bar and select az35, el25 and then raytrace. If you want to view the goblet without the wireframe, go to the Framebuffer option of the Raytrace Control Panel and click on Overlay. The goblet should look similar to the following illustration:

In this lesson, you: