Clip Boxes


Clip Boxes

A clip box differs from a normal box (described earlier in this chapter) in that all particles outside the defined box are not drawn--the data are clipped. Clip boxes are defined in a similar fashion as boxes are in Partiview. The command clipbox, or its equivalent shortened version cb, are Control Commands that define a clip box. To explore how clip boxes work, load Partiview with the Sample Data.

Defining a Clip Box

We can specify the dimensions of a clip box in the same way we specify the size of a box (see boxes). Either use the center point along with the half-lengths in the x, y, and z direction, or specify the minimum and maximum in each of these coordinates. For example, using the Sample Data, we can see what the extent of the data are in each direction using the bound command. Issuing this command will report the information about the data in the format:

num specks in range xmin ymin zmin .. xmax ymax zmax
midbox xcen ycen zcen boxradius xlen ylen zlen
mean xavg yavg zavg

This gives you all the information you need to draw a box. Let's draw a clip box centered on the point (x, y, z) = (0, 0, 0) and half-lengths (or radii) of 50 in the x and y directions and 100 in the z direction. This can be achieved using either of these commands:

cb 0,0,0 50,50,100
cb -50,50 -50,50 -100,100

Note the difference in our use of commas in these two commands. The placement of commas and spaces (or lack of) are important for these commands.


Turning a Clip Box On and Off

To turn to clip box on or off, use the cb on or cb off commands. If you would like to hide the clip box while retaining the data clipping, you may use the cb hide command to remove the box. However, if you have polygons on, they will be unclipped in hide mode; turn the polygons off and you will see the points clipped. cb off will bring all the data back into view.

© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott