Additional Exercises Placing Shapes in 3-D Space


In this lesson, you will:

In previous lessons, we created and edited shapes and placed objects in 3-D space. This lesson provides more advanced practice in these areas using the candle design you created in the last lesson.

Open the candle.g database if it isn't already open and draw candle1.c.

Using the GUI, create a sphere named sph1.s. Go to the View menu and select Top view. Go to the Edit menu, select Scale, and size the sphere until it is proportionally about the same size as the one in the following illustration:

Drag the sphere into position on the rcc, as shown in the previous illustration. To make this task a little easier, you can go to the Modes menu and select Draw Grid. This will create a grid overlay in the Graphics Window, which can help you position your spheres on the candle base.

As discussed earlier, another feature that is available to help you position each sphere is the Multipane option under the Modes menu. This will allow you to see multiple views of the design you are creating.

As you move a shape, the change in position will be reflected in each pane. The multipanes help you visualize where the shape is in 3-D space. In the default mode, the top left pane shows the top view, the top right pane shows the current view, the bottom left pane shows the front view, and the bottom right pane shows the left view. To turn off either the grid or the multipane functions, go back to Modes and select the feature you want to disable.

To make more jewels for the base, you could use the copy command on the Command Line (cp sph1.s sph2.s), but another way to do this is to go to the Edit menu and select Primitive Editor. Type sph1.s in the text box to the right of Name. Click on Reset and then change the name to sph2.s and click Apply. Continue doing this until you've made eight jewels. Because each of the new spheres is an exact copy of the first sphere, you won't be able to see them until you select and then move them.

To position your new spheres, go to Primitive Selection. A submenu of shapes you have created will drop down. Use the scrollbar to the right of the list of shapes to access the spheres you have created, as shown in the following illustration.

Click on sph2.s and drag it into position. Once you have positioned the eight spheres around the rcc, your design should look similar to the following ones when viewed from the top and front.

Candle from Top ViewCandle from Front View

Notice from the front view that there appears to only be five spheres around the base of the candle, but there are eight spheres when you view the design from the top. That is because you are viewing 3-D space on a 2-D screen and the spheres in the back are behind the ones in the front. If you change the view to an az35, el25 view, all of the spheres will appear, as shown in the following figure. This is one reason why it is important to continually check your design from multiple views. A mistake in placement that doesn't appear from one view may be very noticeable from another view.

Now that all your spheres are made and in place, it is time to make a region of each sphere. To do this, type the following in the Command Window: r sph1.r u sph1.s[Enter] r sph2.r u sph2.s[Enter] r sph3.r u sph3.s[Enter] r sph4.r u sph4.s[Enter] r sph5.r u sph5.s[Enter] r sph6.r u sph6.s[Enter] r sph7.r u sph7.s[Enter] r sph8.r u sph8.s[Enter]

Next, go to Edit and then Combination Editor. Select sph1.r from the Select From All choice in the pull-down menu to the right of the Name entry box. Assign properties of plastic and the color red and then press Apply. We then can go back to the Select From All menu listing and repeat this process for the other seven spheres. Alternatively, we could use Apply after selecting the appropriate material properties and then type in the next sphere's name; however, this method requires the user to remember to update the Boolean Expression box (e.g., change u sph1.s to u sph2.s) so that the Booleans for one shape are not applied to another shape.

We are now faced with an important decision. At the moment, the jewels overlap a portion of the candle base (specifically, the rcc1.s portion). Because two objects cannot occupy the same space, we must decide how to resolve this situation. There are two choices:

For this lesson, we will use the first choice.

Now we are faced with a second decision: how to achieve this result. The key is that the space the jewels occupy must be subtracted from the correct part (rcc1.s) of the base.

On the Command Line, create rcc1.c by typing: comb rcc1.c u rcc1.s - sph1.r - sph2.r - sph3.r - sph4.r - sph5.r - sph6.r - sph7.r - sph8.r[Enter] Next, bring up the Combination Editor and select base1.r. Change the union of rcc1.s in the Boolean Expression window to a union of rcc1.c, and click OK. The tree of base1.r should now look like:

Now we need to add the jewels to the whole of candle1.c: comb candle1.c u sph1.r u sph2.r u sph3.r u sph4.r u sph5.r u sph6.r u sph7.r u sph8.r[Enter]

There are just a couple of things left to do before you raytrace your design. If you have enabled Multipanes or Draw Grid, go back to the Modes menu and disable them. Then, clear your screen and draw your new design by typing in the Command Window: B candle1.c table1.r Your new design should appear in the Graphics Window. Open the Raytrace Control Panel and select a pale blue color (200 236 242) by typing the three values in the Background Color entry box. When you raytrace your design, it should look similar to the following one:

In this lesson, you: