StageTools - Documentation (CenterStage/Tutorial) [Prev][Top][Up][Next]


Combining Objects

You've just seen how to create an individual object, so now let's put several objects together into one scene.1 First, delete the surface you have been working with using the Object/Delete menu. Next, create a Group object by selecting Object/New and selecting the Group type in the selection list. After hitting OK, you should see the group object appear in the object list, but the definition window will remain blank. That's because a group doesn't have any values that you need to set; you can still enter things like sliders and other definitions that are to be shared by the members of the group.

To add an object into the group, select Add from the Object menu. For this demonstration, add a Surface to your group and make its functio be

    Function {x y} {let z = x^2 - y^2}
Choose Add again and create an Axes object. Now press Update to see the compound object consisting of the surface and axes together.

Now we will add a third object, this time another Surface, and name it Plane; we are going to make this be a slicing plane that will cut the other surface. We'll make the slice be at a height h given by a slider. To do this, enter the following script for Plane:

   Domain {{-1 1 1} {-1 1 1}}; # this makes a single square
   Function {x y} {let z = h}; # every point is at height `h'
   Slider h -1 1 0;            # the height for the plane
Now when you press Update, a horizontal plane should appear. Select Solid/Blue in the Color menu to make it blue. When you move the slider, the plane will move and cut the surface at different locations.


1

In Geomview, each object that it displays is a distinct element that can be rotated, scaled and translated independent of every other. Indeed, as already mentioned, Geomview will scale and center the objects that you create, so two separate objects are unlikely to have the proper relation to each other in terms of their sizes and positions. Luckily, Geomview also has the concept of a hierarchical object; i.e., a single object made up from several pieces. These are handled in CenerStage by Group objects, which act as containers for other objects. All the objects in a group are treated as a single geometry by Geomview, and so the relative scaling and positioning are preserved between these objects.



[HOME] StageTools Documentation web pages
Created: 08 Sep 2001
Last modified: 08 Sep 2001 23:35:56
Comments to: dpvc@union.edu
[Next] Using Groups to Isolate Updates
[Up] A Short CenterStage Tutorial
[Prev] Adding Sliders