Partiview Commands


Partiview Commands

This section provides an alphabetical listing of the Partiview command set. We recommend reading “Using Partiview” to explore each of these commands and concepts in greater detail.

How to Issue Commands

Partiview has two distinct kinds of commands: Data Commands and Control Commands. Control Commands are meant to be issued within Partiview, while Data Commands are meant to be issued within a data file. However, in Partiview, any command can be issued by any means (interactively, in a config file, or in a data file) using the proper prefix command. These prefix commands are add for Data Commands and eval for Control Commands. In Table 4.2, we outline how and when to use these prefixes.

Table 4.2: Issuing Partiview Commands. If the command requires a prefix, the prefix is typed before the command.
From the Command Line Within a Data File
(interactively) (pre-loaded)
Data Command Preface with add no prefix
Control Command no prefix Preface with eval

Typographical Conventions

typewriter font is used for items that are issued to or returned from the computer. Also includes the listing of file contents and non-Partiview commands.

bold sans serif font is used for Partiview commands.

italic sans serif font is used for Partiview command arguments.

Square brackets ([ ]) denote optional commands or arguments (the brackets are never typed themselves). For example, the command cen[ter] may be issued by typing center or just cen.

The [+,*,/] argument signifies that the command may be scaled by adding a constant value, or by multiplying or dividing the current value by a constant.

The ‘|’ symbol represents the word “or,” meaning one option or another may be used, but not both. For example, the clip box command has the form cb [on | off | hide] | [boxparameters]. You can either use cb on, cb off, cb hide, or cb 0,0,0 10,10,10. You cannot use two of these arguments, like cb on 0,0,0 10,10,10.

The « and » angle brackets are meant to group items together, such as the style argument in the ellipsoid Data Command. The argument has the form: -s «solid | plane | wire | point». This groups the four styles to be used with the -s argument. The style argument must have the -s along with one of the styles to be complete.

Partiview Command List

This is not a complete listing of Partiview commands; however, we include many of the commands that you will find useful. You may consult information on the Partiview web site for more information.





add
The add command is used before any Data Command run from the Partiview Command Line. All Data Commands in this listing have the [add] preface shown to distinguish Data Commands from Control Commands. add is not necessary if you are issuing the command inside a data file.
Example: Adding Data
See Also: eval





alpha [+,*,/][value]
The alpha command describes the opacity (opaqueness) of an object. The value argument ranges between 0 and 1, 0 describing no opacity (completely transparent), 1 setting maximum opacity. The default is 0.5.
Example: The Opaqueness of the Polygon
See Also: texture Data Command, lum





async command
Run a UNIX command as a subprocess of Partiview. The output of the subprocess is interpreted as a stream of control commands. This allows Partiview to be driven externally by another program, such as another GUI or a shell script with Partiview commands prefaced by the shell command echo. For example, if you make an executable file called file.sh with the commands
echo g1 on
echo g1 lsize *2
echo g2 slum *3
then these commands will be executed in sequence upon running the file via the command
async ./file.sh
issued at the Command Line in Partiview. Note that once a subprocess is started, it cannot be interrupted unless Partiview itself is terminated.

NOTE: This command works only on UNIX-based operating systems (IRIX, Linux, Macintosh) and does not run in Windows (unless you're running a UNIX emulator).





bgcolor [grayscale | R G B]
Reports the background color of the display in red, green, and blue colors. Including the R G B arguments will set the background color. For example, bgcolor 1 1 0 will produce a yellow background, while bgcolor 1 1 1 will give you a white background. We mostly use a black background, bgcolor 0 0 0. Specifying only one color sets a grayscale (R = G = B) for various levels of gray (0-1).
Example: Changing the Background Color
See Also: color const, color





bound [w]
Reports the number of data points and the 3-D extent for the active data group. Also reports the parameters needed for box dimensions. With the w argument, the report is in world coordinates, otherwise bound reports in object coordinates.
Example: Clip Boxes, The Spatial Extent of the Data
See Also: clipbox, boxes Data Command





boxaxes [on | off]
Toggles the box axes display mode which enhances the colors of the box. The red, green, and blue axes that are seen in the Point of Interest are reflected in the corresponding axes on the box.
Example: Coloring Boxes
See Also: boxes Data Command, boxes Control Command, boxcmap, boxcment, boxlabel, boxscale, clipbox, gobox, hidebox, showbox





boxcmap filename
Selects a color map file for coloring a box or many boxes assigned to the active data group. Refer to this color index using the -l option in the boxes Data Command.
Example: Coloring Boxes
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcment, boxlabel, boxscale, clipbox, gobox, hidebox, showbox





boxcment colorindex [R G B]
Assign a R G B color to a color index specified by colorindex. Refer to this color index using the -l option in the boxes Data Command.
Example: Coloring Particles and Objects, Boxes
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcmap, boxlabel, boxscale, clipbox, gobox, hidebox, showbox





box[es] [on | off | only]
If a box has been defined (see the boxes Data Command to define a box), the box[es] Control Command toggles the box display. The on | off arguments turn the box on and off. The only argument turns all the particles (points) off; however, if polygons are on, they will remain displayed.
Example: Turning Boxes on and off
See Also: boxes Data Command, boxaxes, boxcmap, boxcment, boxlabel, boxscale, clipbox, gobox, hidebox, showbox, bound





[add] box[es] [-n boxnumber] [-l level] coordinates
Use the box[es] Data Command to draw a box of number boxnumber, color index level, and size specified by the coordinates argument. The coordinates can be specified in two ways:
[xmin,xmax ymin,ymax zmin,zmax] draws a box using the minimum and maximum values for each coordinate. These values define the 6 planes that make up the box. In this format, the six values are written in coordinate pairs. (Note the use of commas to separate each coordinate's minimum and maximum value and the use of spaces to separate the three coordinates.)
[xcen,ycen,zcen xrad,yrad,zrad] draws a box centered at xcen,ycen,zcen and with half-lengths (or “radii”) given by xrad,yrad,zrad. (Note the use of commas to delineate each center and radius value and a space to separate the center and radius groups.)
Boxes can be turned on or off using the boxes Control Command.
Example: Boxes
See Also: boxes Control Command, boxaxes, boxcmap, boxcment, boxlabel, boxscale, clipbox, gobox, hidebox, showbox, bound





boxlabel [on | off]
If a box was added using the -n option, then boxlabel toggles the box label on or off. The label, which is just the box number, appears at the center of the box. If you wish to put a more descriptive label on a box, add a label using the text command.
Example: Displaying the Box Label
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcmap, boxcment, boxscale, clipbox, gobox, hidebox, showbox





boxscale [scalefactor] | [off]
Scales the size of all boxes in the active data group by scalefactor. For example, the command boxscale 2 will increase the size of all boxes in the data group by a factor of 2. boxscale off and boxscale 1 both set the boxes to their normal size as defined by the boxes Data Command
Example: Scaling Boxes
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcmap, boxcment, boxlabel, clipbox, gobox, hidebox, showbox





cb [on | off | hide] | [boxparameters]
See the clipbox command.





censize [+,*,/][radius]
Sets the size of the Point of Interest Cartesian marker. The units of radius depend on the units of your data. If you are displaying data with units of meters, then censize 1 would set each axis (from the origin to the end) to one meter. You can also scale the current value by adding a constant, or multiplying or dividing by a constant, such as censize /2 to divide the current size by two.
Example: Adjusting the Size of the Point of Interest





cen[ter] [x y z] [radius]
Sets the position of the Point of Interest at the point (x, y, z). This is the rotation point in the [o]rbit and [r]otate flight modes. It is also the point where the three dimensional Cartesian axes are displayed. The optional radius argument sets the size of the Point of Interest in the same way the censize command set the size.
Example: Setting the Point of Interest
See Also: interest





clearobj
Clear all data in the current data group. This is helpful when re-loading data into a data group. To clear all data in all groups, use the gall command before clearobj.
See Also: read, include





clip [nearplane] [farplane]
The clip command reports and sets the distances of the near and far clipping planes. The nearplane argument sets the distance to the near clipping plane. In computer graphics, the near clipping plane is an unseen plane parallel to your screen. Between your screen and this plane, your data will be invisible. Similarly, the far clipping plane defines the point beyond which no data are drawn by the computer.

The nearplane and farplane arguments must be positive. The value of these arguments may produce unwanted effects depending on your operating system, such as flashing and blinking. Some operating systems cannot handle a nearplane less than 1, some cannot handle a farplane to nearplane ratio over 10,000. You may need to experiment.
Example: Clipping Planes





clipbox [on | off | hide] | [boxparameters]
A clip box is a box that highlights a portion of a data set by turning off all data outside the six planes that make up the specified box. The dimensions can be set by specifying the boxparameters arguments. These are of the same format as the boxes Data Command and can be given in two ways:
[xmin,xmax ymin,ymax zmin,zmax] draws a clip box using the minimum and maximum values for each coordinate. These values define the 6 planes that make up the box. In this format, the six values are written in coordinate pairs. (Note the use of commas to separate each coordinate's minimum and maximum value, but spaces are used to separate the three coordinates.)

[xcen,ycen,zcen xrad,yrad,zrad] draws a clip box centered at xcen,ycen,zcen and with half-lengths (or “radii”) given by xrad,yrad,zrad. (Note the use of commas to delineate each center and radius value and a space to separate the center and radius groups.)

Using the on and off arguments turns the pre-defined clip box on or off. The hide argument continues clipping the data (points only, polygons will remain on) but turns the box off.
Example: Clip Boxes
See Also: bound, cb, boxes Data Command





cmap filename
Loads a color map file filename for coloring particles in the active data group. For information on color map files, see “Coloring Particles and Objects”.
Example: Creating a Color Map
See Also: cment, color, color datavar exact





cment colorindex [R G B]
Reports the red, green, and blue values of the colorindex. If the R G B arguments are specified, the colorindex is assigned the R G B colors. The colorindex should be a positive number and the values of R, G, and B all range from 0-1. See “Coloring Particles and Objects” for more information on coloring particles and objects.
Example: Customizing a Color Index
See Also: color, cmap, boxcment, textcment





color
Typing the color command without any arguments reports the coloring of the active data group. Reports reflect whether particles are being colored using the color const or the color datavar commands. If you are setting a constant color to all particles, then the report will be of the form:
coloring-by rgb R G B
while coloring using a data variable generates the report:
coloring-by num(name) min.. max mean avg
Here, num and name refer to the data variable, min.. max is the range of the data and avg is the mean value of the data.
Example: Coloring Particles and Objects
See Also: color const, color datavar, color datavar exact, cment, cmap, bgcolor, boxcmap, boxcment, textcment, textcolor





color const R G B
Sets all particles in the active data group to the color R G B. Each of these range in value from 0-1.
Example: Setting a Constant Color
See Also: color, color datavar, color datavar exact, cment, cmap, bgcolor, boxcmap, boxcment, textcment, textcolor





color datavar [minval maxval]
Sets all particles in the active data group to be colored using the data variable datavar. If a column of data in your data file holds the coloring information, you may define a data variable using datavar, then use the name from that definition as the datavar argument. The minval maxval arguments are provided to specify a mapping range in color indices. Typically, you would want to set these to a color index between 1 and n - 1 since the zeroth and last entries are used for out of range values in color maps. If these arguments are omitted, then the actual range from the data is used.
Example: Setting a Color Variable
See Also: color, color const, color datavar exact, cment, cmap, bgcolor, boxcmap, boxcment, textcment, textcolor





color datavar «exact [baseval] | -exact»
This color command maps one to one to the color map file for the data group. Rather than distribute the colors over some range, the exact command maps the color index values to their exact number in the color map. For example, if a particle has a color index of 10, then using the exact command will set that color to the 10th entry in the color map. To turn off exact coloring, use the -exact command. If a baseval is included, then the exact color index N is mapped to N + baseval.
Example: Using a Color Map
See Also: color, color const, color datavar, cment, cmap, bgcolor, boxcmap, boxcment, textcment, textcolor





datavar [num] [name] [minval maxval]
The datavar command attaches a variable name name to a column of data. The num argument is just the column number minus 4 since the first three columns are always reserved for the spatial coordinates (i.e., datavar 0 equals column 4). These definitions should come in the .speck files before your data. The variable names can then be used to color, set the luminosity, or threshold data. Without any arguments, datavar reports the pre-defined data variables for the active data group. This report has the form:
datavar num name min.. max mean avg
where num is the data variable number (which maps to the column number plus 4) and name is the name you've given the data variable. The minval and maxval arguments set the range of the data. Without these arguments, the range of the data is used.
Example: Thresholding Data, Importing Your Data





detach
Use detach to separate the Graphics Window and the GUI into two distinct windows. detach, along with the winsize command, can be used to run Partiview full screen.

NOTE: The winsize and detach commands do not work consistently on Mac OS X.
Example: Running Partiview Full Screen
See Also: winsize





disable
Same as the off command.





dv [num] [name] [minval maxval]
Same as the datavar command.





ellipsoid [on | off]
If an ellipsoid has been defined in the active data group, the ellipsoid Control Command toggles the display on and off. To define an ellipsoid, use the ellipsoid Data Command.
Example: Spheres and Ellipsoids
See Also: ellipsoid Data Command





[add] xcen ycen zcen ellipsoid [-r xrad[,ycen,zcen]] [-c colorindex]
[-s style] [-n numlong[,numlat]] [transformation]

The ellipsoid Data Command sets the parameters and displays an ellipsoid that will belong to the active data group. The ellipsoid will be centered on the coordinate xcen, ycen, zcen and is drawn with the following options.
-r xrad[,yrad,zrad] sets the x, y, z radii or semi-major axes. For a sphere (xrad = yrad = zrad), specify a value for xrad and omit the yrad and zrad arguments. For a plane, set one of these arguments to zero. For a line, set two of these arguments to zero. If you omit all of these arguments, the default is xrad = yrad = zrad = 1.

-c colorindex assigns a color index to the object. The color is derived from the color map for the active data group. A new color may be assigned using the cment command to change the color for the assigned color index. Without this argument, the colorindex is set to -1, which is an out of range value and will be assigned the zeroth color in the color map.

-s «solid | plane | wire | point» sets the drawing style. The allowed styles are
solid a filled surface, but without any shading for perspective,
plane draws three ellipses in the xy, xz, and yz planes,
wire draws a wire frame ellipsoid, and
point represents the ellipsoid as points drawn at each vertex. A brighter color helps make an ellipsoid of this style more visible.
-n numlong[,numlat] sets the number of vertices, or lines of longitude and latitude in wire style. The value of numlong is equal to the number of longitude lines while numlat is equal to the number of latitude lines plus two (for each pole). For example, to create a wire frame sphere with lines of longitude and latitude every 10o, you would use the option -n 36,19. Without the numlat option, numlat = numlong.

transformation is a series of numbers that describe a transformation of the ellipsoid from the default world coordinates. The transformation can either be 9 or 16 numbers separated by spaces.

Example: Spheres and Ellipsoids
See Also: cment, alpha, tfm, add, ellipsoid Control Command





enable
Same as the on command.





eval command
Executes a Control Command from a data file. All Control Commands (which appear in this listing without the [add] preface) must have the eval preface if they are issued from a .cf or .speck file.
See Also: add





every N
Display a random subset of the active data group by choosing every Nth particle. To display all particles in the data group (the default), type the command every 1. every 2 shows about half the data, and so on.
Example: Luminosity Scale Factors, Displaying a Random Subset
See Also: bound, lum





exit
Issue this command to quit Partiview. Note also you may use the ESC key to quit.





fade [planar | sph | linear refdist | const refdist]
The fade command describes the light fall off law with regard to distance. Typically, we use a 1/r2 law, as it is in nature. However, we can set the intensity to distance relationship using the following options.
planar sets an inverse square fall off (1/r2), with r measured as the distance from the view plane (the screen).

sph is also an inverse square fall off, but with r measured as the true distance from the viewpoint at the center of the screen.

linear refdist gives a 1/r light fall off, not physically accurate but perhaps useful to get a limited sense of depth.

const refdist sets a constant apparent brightness that is independent of distance. The refdist argument is defined as that distance r at which apparent brightness should match that of an inverse square law.

With no arguments, fade reports the current fade setting. The default is spherical (sph).
Example: Distance of Particles
See Also: lum





fast [on | off] [minpixels] [maxpixels]
fast is a command that alters the way points are drawn. If fast is off, then the points are drawn at a higher quality. Conversely, if fast is on, then the points are drawn more primitively but require less computational resources. fast takes its parameters from the ptsize command. If no ptsize has been defined for the active data group, then you may define the range here by including values for the minpixels and maxpixels arguments. See ptsize for more on these values.
Example: Rendering the Point
See Also: ptsize, lum





[add] filepath [+:]path
A list of directory paths, separated by colons, where data files, color maps, images, flight paths, and other necessary files are located. Include the +: argument to append path to the current file path. For example, filepath ./data sets the file path to the data folder, which is in the current folder. To append another path, use filepath +:./images to add the images folder.
Example: Reading Data from a File
See Also: read





focallen [distance]
Reports (without an argument) or sets (with distance) the focal length. The focal length affects the stereo display (see stereo) as well as the speed of motion in the [f]ly and [t]ranslate flight modes.
See Also: stereo





fov degrees
Sets the field of view in the local (screen) y direction to degrees. Values have the range 0o < degrees < 180o. Higher values distort the view, while low values provide a “zoomed in” view. Typing fov without any arguments reports the current value.
Example: Field of View





gN[=alias]
Select or create data group number N. If group N exists, typing gN will make group N the active data group. If group N does not exist, it will be created. If you append the =alias argument, the data group is given the name alias (no spaces between the equal sign). alias can then be used by object to refer to data groups by name, rather than number.
Example: Reading Data from a File





gN command
Similar to the gN[=alias] command, without the command argument, group N will be created, or selected as the active data group if it exists. The command argument can take any relevant Partiview Control Command that you would like to apply to group N. For example, g4 color const 1 0 0 will turn all particles in group 4 red.





gall -v | command
The gall command is designed to perform some action on all data groups. If you issue gall -v, Partiview will report all the defined data groups and their display status (on or off). If you issue gall command, then command will act on all data groups. For example, if you want to multiply the slum value of all data groups, you would enter gall slum *2.
Example: Operating on all Data Groups
See Also: gN-command





gobox boxnumber
The gobox command shifts the Point of Interest to the center of box boxnumber. The boxnumber is designated in the boxes command using the -n option.
Example: Changing the Point of Interest to Box Center
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcmap, boxcment, boxlabel, boxscale, clipbox, hidebox, showbox





hidebox level
If multiple boxes are defined, a subset of boxes can be toggled on and off using the showbox and hidebox commands. Boxes are grouped by the level specified in the boxes Data Command. By giving several boxes the same level number, these boxes can then be toggled on or off while leaving other boxes unchanged. For example, if you have defined 10 boxes and five of them were defined with a -l 3 argument, then these five boxes can be turned off using the hidebox 3 command or turned on using the showbox 3 command. In addition, a listing of level numbers can be used, such as showbox 2 23 15 to show boxes that have level values of 2, 15, and 23.
Example: Showing and Hiding Boxes
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcmap, boxcment, boxlabel, boxscale, clipbox, gobox, showbox





hist [-n numbins] [-l] [-c] [-t] datavar [minval] [maxval]
Reports a histogram of the data field datavar in the Console Window. The arguments are defined as:
-n numbins sets the number of bins for the histogram (default = 11),
-l sets the intervals to be logarithmically-spaced (as long as the data range does not include zero),
-c counts only the particles displayed within a clip box,
-t counts only particles in a subset defined by thresh or only,
datavar is the data variable to return the distribution for,
minval is an optional minimum value for the distribution range, and
maxval is an optional maximum value for the distribution range.
The available data fields are reported to you when you use the datavar command on the active data group. It will return the defined data fields and their range. The order of the arguments is important; some may not take effect if they are not issued in this order.
Example: Generating a Histogram of the Data
See Also: bound, thresh, only





[add] include filename
Read a file containing data (a .speck file) or data commands (a .cf file). If you use this in a file, you do not need the add preface. This is the same as the read command.
See Also: read





int[erest] [x y z] [radius]
Same as the center command.
Example: Setting the Point of Interest
See Also: center





jump [x y z] [Rx Ry Rz]
The jump command, without any arguments, returns the current position in the format x y z Rx Ry Rz, where x y z is your position and Rx Ry Rz are the rotation angles of your point of view. These three angles are rotations about the x, y, and z axes. If the x y z arguments are included, then your position is reset to the x, y, z specified, the rotation angles will remain the same if unspecified. For example, if you are 5 units out on the + z axis (jump 0 0 5 0 0 0), then you can rotate the view about z by changing the Rz parameter (try jump 0 0 5 0 0 45).
Example: Changing Your Position
See Also: where





label[s] [on | off]
Turns on (or off) the labels for the active data group (if labels are specified). Typing label toggles their display, but label[s] can also take the on or off arguments explicitly. The Label toggle button also turns the labels on and off for the active data group.
Example: Labeling Your Data
See Also: labelsize, labelminpixels, laxes, textcment, textcolor, boxlabel





labelmin[pixels] [+,*,/][size]
Describes the minimum size in pixels before a label will be drawn. By default, the size of the label is proportional to its distance. Set the size argument low (relative to the defined label size), and labels will be drawn far off into the distance to the point where they are unreadable. Set size high (again, relative to the defined label size), and labels will only be drawn nearby.
Example: Labeling Your Data
See Also: labels, labelsize, laxes, textcment, textcolor, boxlabel





l[abel]size [+,*,/][size]
Set the size of the labels in the distance units of your data. If, for example, your Partiview session has data that are in units of meters, then the size argument will be in meters (as scaled by the graphics, of course). The labels in Partiview are drawn proportional to your distance from them. The size of the labels can also be scaled by the [+,*,/], such as lsize *2.5. The relative size of the labels within a data group may be controlled using the -size argument in the text command.
Example: Labeling Your Data
See Also: labels, labelminpixels, laxes, textcment, textcolor, boxlabel, text





laxes [on | off]
Toggles the label axes on and off. The label axes (laxes) are an x, y, z Cartesian axis placed at each label location. By default, they are on.
Example: Labeling Your Data
See Also: labels, labelsize, labelminpixels, textcment, textcolor, boxlabel





lum
The lum command without any arguments reports the current luminosity setting for the active data group. If the group is set to a constant luminosity via the lum const command, then Partiview reports
lum-by constant L
where L is the value given to all particles. If the luminosity is set to a data variable in your .speck file using the lum datavar command, then Partiview will report
lum-by num (name) [min.. max mean avg]
where num is the data variable number, name is the name given to the data variable, min.. max is the range of your data, and avg is the mean value.
Example: Setting the Luminosity of Particles
See Also: lum const, lum datavar, slum, alpha, datavar, fade, psize, every, ptsize, fast, polysize, polylumvar





lum const [+,*,/]L
Sets a constant particle luminosity, L, for the active data group. This command insures that all points in the given data group have the same luminosity.
Example: The lum const Command
See Also: lum, lum datavar, slum, alpha, datavar, fade, psize, every, ptsize, fast, polysize, polylumvar





lum datavar [min max]
The lum datavar command allows for a variation in luminosity within one data group. If a particular data group has luminosity information as part of the data set (i.e., one of the columns in your .speck file is luminosity), then the luminosity data field datavar can be mapped to values between min and max. Without the min and max arguments, the values are mapped to the range of the data.
Example: The lum datavar Command
See Also: lum, lum const, slum, alpha, datavar, fade, psize, every, ptsize, fast, polysize, polylumvar





[add] mesh [-t texnum] [-c colorindex] [-s style]
Given a set of x, y, z points, mesh will draw a series of lines connecting the points. If the -c colorindex argument is specified, the mesh is given the R, G, B color pointed to by the colorindex set by the cment command. The -s style argument sets the drawing style according to these styles:
solid draws a filled polygon surface (the default),
wire draws a wire-frame mesh (just lines), and
point draws points at each vertex.
The default is solid if the -s argument is unspecified. The -t texnum argument specifies a texture number, set via the texture command, to map on the mesh. The texture is mapped according to the u and v coordinates specified after the (x, y, z) coordinate. The u and v coordinates range from 0 to 1, rescaling the size of the texture to this range and mapping on the mesh.



When expressing the mesh command in a file, you must use the following form:
mesh -c 1 -s wire {
numu numv
x y z u v
...
}
Note the use of the opening and closing curly braces after the mesh command. numu numv specify the dimensions of the mesh. For a line between two points, numu will be equal to 1. For a quadrilateral grid, the numu numv arguments will specify the grid dimensions. For a square grid, these numbers will be equal to one another.
Example: Drawing Meshes
See Also: ellipsoid Data Command, boxes Data Command





object [alias [command]]
The object command provides a reference to data groups by name rather than number. Typing object with no arguments will report the alias of the active data group. Including the alias argument will change the active data group to the group specified by alias. Including the command argument will execute the command on the data group alias. For example, typing object stars on will turn on and activate the data group called “stars.” Typing object mygroup lsize*5 will activate the data group “mygroup” and increase the label size by 5, but will not display the group if it is off.

object provides a way to activate a data group without having to remember its group number or access its group button.
Example: Defining a Data Group





[add] object gN=alias
Issued in a data file, the object Data Command defines a group and sets its alias.
See Also: gN





off
Turn off the display of the active data group.
See Also: disable





on
Display the active data group.
See Also: enable





only= datavar «value | minval maxval | <maxval | >minval»
The only= command creates a subset of particles from the active data group based on the datavar data. The selection criteria can be made in several ways. By including the value argument, only the data whose data variable equals value will be displayed. To display a range of data, you may specify a minimum and maximum value in minval maxval. Or, display only those data that have are greater than or less than a given value using the <maxval and >minval arguments. For examples on how to use the only commands, see “Selecting Data with Specific Values”.
Example: Choosing Particular Values to Display
See Also: only+, only-, thresh, datavar, see, sel





only+ datavar «value | minval maxval | <maxval | >minval»
Using the same selection criteria as the only= command, the only+ command allows you to add data to the current selection set. If a selection set has been defined using the only= command, then the only+ adds data to the selection. If no selections have been defined, then only+ acts like only= and thresholds the data.
Example: Choosing a Subset from a Subset
See Also: only=, only-, thresh, datavar, see, sel





only- datavar «value | minval maxval | <maxval | >minval»
Using the same selection criteria as the only= command, the only- command allows you to remove data from the current selection set. If a selection set has been defined using the only= command, then the only- removes data from the selection. If no selections have been defined, then only- removes all data.
Example: Choosing a Subset from a Subset
See Also: only=, only+, thresh, datavar, see, sel





point[s] [on | off]
Turn on (or off) the display of points for the active data group. Simply typing point toggles the display. The Point toggle button also toggles the display of points.
Example: Drawing Points
See Also: ptsize, fast





poly[gons] [on | off]
Turns on (or off) the polygons. Typing poly alone will toggle the polygons on or off. Also, the Poly toggle button will turn the polygons on and off.
See Also: polysides, polysize, polyminpixels, polylumvar, polyorivar, texture Data Command, texture Control Command, alpha, lum, slum





polylum[var] [a | r | datavar]
Set how the polygons are sized. The default, polylum r, sets the radius of the polygon to be equal to the polysize value. The a argument sets the radius of the polygon according to the area of the polygon set by polysize. For example, if polysides is 4 and polysize is set to 10, then with polylum r the radius of the polygon would be 10, while with polylum a the radius would be $ \sqrt{{10}}$ (since the area of a square is 2*r2. If datavar is specified, then the polygons are sized according to the data variable. The default is -1, which scales the size to those set by the luminosity commands lum, slum, polysize, and a few others.
Example: Sizing Polygons According to a Data Variable
See Also: polygons, polysides, polysize, polyminpixels, polyorivar, texture Data Command, texture Control Command, alpha, lum, slum





polymin[pixels] [minpixels maxpixels]
This command sets the minimum and maximum size (in pixels) for the polygons to be drawn. The minpixels value sets the minimum size for a polygon to be drawn, that is, no polygons will be drawn below size minpixels. The maxpixels argument sets the maximum size for a polygon. Without any arguments, polymin reports the current values.
Example: The polyminpixels Command
See Also: polygons, polysides, polysize, polylumvar, polyorivar, texture Data Command, texture Control Command, alpha, lum, slum





polyorivar [num]
Reports the polygon orientation information. Orientation is specified as 6 columns of numbers in the .speck file. The six numbers are two sets of three that describe orthogonal vectors in the plane of the polygon. The first of these numbers is defined using a datavar command. polyorivar is then used in the data file to tell Partiview which column (datavar name) is the first orientation column. The num refers to the datavar number. The default value of num is -1 which draws polygons that always face the screen.
Example: Setting the Polygon Orientation
See Also: polygons, polysides, polysize, polyminpixels, polylumvar, texture Data Command, texture Control Command, alpha, lum, slum





polyside[s] [numsides]
Set the number of sides of the polygons in the active data group. numsides ranges from 3 to 16. The default value is 11, which produces a round polygon. If you are placing textures on your polygons, the optimal number of sides is 4. Without the numsides argument, the current value is reported.
Example: Sizing Polygons
See Also: polygons, polysize, polyminpixels, polylumvar, polyorivar, texture Data Command, texture Control Command, alpha, lum, slum





polysize [+,*,/][size]
Set the size of the polygons in distance units. The size argument, like the labelsize command, is relative to the units of distance of the data. The size of the polygon is then scaled by the lum and slum commands.
Example: Sizing Polygons
See Also: polygons, polysides, polyminpixels, polylumvar, polyorivar, texture Data Command, texture Control Command, alpha, lum, slum





psize [+,*,/][scalefactor]
A global scale factor that scales the luminosity of the points by scalefactor. A scalefactor of 0 gives the points zero luminosity. A high scale factor allows points to be visible from large distances. psize does not affect polygon size, only the point size.
Example: Luminosity Scale Factors
See Also: points, lum, lum const, slum





ptsize [minpixels] [maxpixels]
Sets the range of apparent sizes in pixels for all points in the active data group. Points have a range of sizes that is dependent your distance from them. The size of a point will generally grow as you approach it. However, it is possible to saturate the size by setting a maximum slum value, for example. minpixels is the minimum size in pixels a point must be before it is drawn. maxpixels sets the maximum size in pixels a point will reach. Most graphics systems have an upper limit for the size of a point, which is usually around 10-20 pixels.
Example: Drawing Points
See Also: fast, points





read filename
Use this command to read a data file filename into Partiview. The read command acts as both a Data Command as well as a Control Command. This means that you may use read in the Command Line interactively without the add prefix, and you may use read in a data file without the eval prefix.
Example: Reading Data from a File
See Also: include, filepath





see [all | none | thresh | name]
The see command allows you to toggle between various data thresholding scenarios. The all and none show all, or none, of the particles in the active data group. If a subset of data have been defined using the thresh or only commands, then thresh displays these settings. Using the sel command, selection settings can be saved and used here as name.
Example: Thresholding Data, Selection Expressions
See Also: only=, only+, only-, thresh, datavar, sel





sel name = thresh
The sel command allows you to save a threshold scenario with the name name. These expressions can then be used with the see command. For example, if you used thresh or only to display a subset of data, then the command sel myselect = thresh would save the threshold setting with the name myselect. Then, to toggle views you would type see myselect, then see all to see all particles again.
Example: Selection Expressions
See Also: only=, only+, only-, thresh, datavar, see





showbox level
If multiple boxes are defined, a subset of boxes can be toggled on and off using the showbox and hidebox commands. Boxes are grouped by the level specified in the boxes command. By giving several boxes the same level number, these boxes can then be toggled on or off while leaving other boxes unchanged. For example, if you have defined 10 boxes and five of them were defined with a -l 3 argument, then these five boxes can be turned off using the hidebox 3 command or turned on using the showbox 3 command. In addition, a listing of level numbers can be used, such as showbox 2 23 15 to show boxes that have level values of 2, 15, and 23.
Example: Showing and Hiding Boxes
See Also: boxes Data Command, boxes Control Command, boxaxes, boxcmap, boxcment, boxlabel, boxscale, clipbox, gobox, hidebox





slum [+,*,/][scalefactor]
A luminosity scaling factor that increases the brightness of all points in a data group. slum is a data variable-specific scale factor, meaning you could have several slum settings, one for each data variable. For example, if you have a file with two data variable columns, one for the brightness of the object, defined in a datavar command as lumin, and one for the actual size called diam, then one could set the luminosity, or size, of the particles to either of these using these commands:
lum lumin
slum 10.5
lum diam
slum 2.3
Once you have set the slum value for each of these, then you can toggle between settings using the lum datavar command, as in lum lumin and lum diam. Your slum settings will remain for each datavar so that you don't have to set the scaling each time you wish to view an alternate representation of the data.
Example: Luminosity Scale Factors
See Also: lum, lum const, lum datavar, datavar, polysize





snapset [-n framenumber] filestem
snapset defines a filename for writing a snapshot of the current view. This is how Partiview exports a screen grab of the OpenGL output. The image is written into a compressed Portable PixMap (*.ppm) file by default, but can be written into various image types (tif, jpeg, bmp, etc.) given you have the convert(1) program installed and in your path (this applies to UNIX and UNIX-like environments).



The filestem argument sets the file name (minus extension). Partiview will append the frame number (beginning at zero) and the file extension (.ppm) along with the gzip extension (.gz). The filestem may also be expressed as a C printf()-like format string with the frame number acting as the argument for the format specifier (see examples below). You may also provide the filestem with a frame number using the -n framenumber option. Whatever frame number you begin with, whether it is the default (0) or one specified with the -n option, subsequent snapshots will take on the current frame number plus one.



Some examples of the snapset command are:
snapset -n 4 picture: Here we issue snapset with a frame number of 4 and a filestem called picture. Once the snapshot command is executed, the resulting file will be called: picture.004.ppm.gz. Note here that the default frame number (004) is 3 digits in length. To have a longer or shorter frame number, we must supply a format specifier.

snapset -n 20 picture%05d.ppm: Now we have a frame number of 20 and we tell Partiview to create a file called picture with a frame number that is 5 digits in length (filling in with leading zeros) with an extension of ppm without compression. The resulting file name is: picture00020.ppm.

snapset -n 10 picture%03d.tif: Similar to the above example, except here we set the frame number to 10 and specify a frame number of 3 digits. Then we specify a tif extension, creating a TIFF file. The resulting file will be called picture010.tif.

once snapset is executed, you must use snapshot to export the image.
Example: Exporting the Display
See Also: snapshot





snapshot [filestem]
Capture a screen grab of the Graphics Window. The argument filestem sets the filename just as it does in the command snapset. Typically one would set the output type and filename using snapset, then issue the snapshot command to save the image.
Example: Exporting the Display
See Also: snapset





stereo [on | off | redcyan | glasses | cross | left | right] [separation]
Without any arguments, stereo reports the current stereo setting. The on and off arguments are used to turn the stereo display on or off (you may also use the s key in the Graphics Window). redcyan should be used with red-green or red-blue glasses. If you have red-blue glasses, we recommend setting the particle color to purple (color const 1 0 1) so that the image splits into red and blue. The cross argument splits the Graphics Window into two identical views for cross-eyed stereo. The left and right arguments display only the left and right eye's view which may be useful for stereo snapshots. The separation argument describes the separation of the two images. Typical values range between 0.02 and 0.1 (or -0.02 to -0.2 if you want to swap eyes).



Also see focallen which sets the distance to a typical object of interest--left- and right-eye images of an object at that distance will coincide on the screen. Virtual world eyes will be separated by a distance 2 x focallen x separation with a convergence angle of 2 x arctan(separation).



As a warning, on some systems that support hardware glasses, like SGI IRIX, you may need to set the video mode to stereo, Partiview does not do this automatically. Without this setting, you will just see the left-eye view.
See Also: focallen





[add] x y z text [-size value] yourlabel
Typically used in a data file, a label can be added interactively via the Command Line by prefacing it with add. Just supply the x, y, z location of the label and the text of the label in place of the yourlabel argument. For example, to interactively place a label that reads “Star Number One” (without the quotes) at (x, y, z) = (400, 200, 200), type add 400 200 200 text Star Number One in the Command Line. Or, simply include the line 400 200 200 text Star Number One inside a data or config file. Labels can be sized relative to one another using the -size option, increasing or decreasing the size of the label by the factor value. For example, to set a label to half its value, use -size 0.5 option.
Example: Labeling Your Data, Create a Label File
See Also: add, labels, labelsize, labelminpixels, laxes, textcment, textcolor





textcment colorindex [R G B]
Define a text color R G B to the color index colorindex for the active data group. Use this in conjunction with the textcolor command.
Example: Coloring Particles and Objects, Labeling Your Data
See Also: textcolor, labels, labelsize, labelminpixels, laxes, text





[add] textcolor colorindex
Associate the text color for a given data group or a portion of a data group with the colorindex assigned via the textcment command. Note: this command does not appear to work from the Command Line or from within a config file. It must appear in the .speck file where the labels are listed. (so the [add] preface is listed here for consistency but has no effect on the usage of textcolor.)
Example: Coloring Particles and Objects, Labeling Your Data
See Also: textcment, labels, labelsize, labelminpixels, laxes, text





texture [on | off]
Toggles the textures on and off. The Texture toggle button also turns the textures on and off.
Example: Turning Textures On and Off
See Also: texture Data Command





[add] texture [-aiAOMD] texnum filename
Associates a texture file filename with a texture number texnum for a particular particle or many particles. Using the datavar command, a data variable can be defined in your .speck file to hold the texture number for each particle. Then, using texture, the same texture numbers are assigned to the desired files. Display options include:
-a Alpha: Image is taken as opacity data, rather than luminance data (the GL_ALPHA texture format). A single-channel image is normally used as luminance data.

-i Intensity: Computes the intensity of each pixel and uses it to form an alpha channel for 1 or 3 channel images.

-A Additive blending: Texture will add to, not obscure, the brightness of textures that are behind it.

-O Over compositing: Texture will obscure features behind it according to the alpha values at each point.

-M Modulate: Multiply the texture brightness/color values by the color map-determined color of each particle.

-D Decal: The texture's polygon color is determined entirely by the texture, suppressing any color map information.
To turn textures on and off, see the texture Control Command.
Example: Adding Textures
See Also: texture Control Command, texturevar, txscale, alpha, polygons, polyminpixels, polyorivar, polysides, polysize, polylumvar, color





[add] texturevar datavar
Sets which datavar (column in a file) to be read as texture numbers. Texture numbers are defined in the texnum argument of the texture Data Command. For example, if column 6 in a given data file is the texture number assigned to each particle, then texturevar 2 would tell Partiview that column 6 is where the texture information is located for each particle (recall the first three columns of any data file are always x, y, z, and Partiview begins counting from zero for columns thereafter).
Example: Adding Textures
See Also: texture Data Command, texture Control Command, datavar





tfm [matrix]
Apply a transform to the active data group. The matrix takes the form tx ty tz Rx Ry Rz, where tx ty tz are the x, y, z translations and Rx Ry Rz are the rotations about the x, y, z axes, respectively. For example, if you would like to move a data group 10 units of distance in the y direction, then you would issue the command: tfm 0 10 0 0 0 0 (making sure that the group you want to transform is the active data group).





thresh [on | off | datavar «minval maxval | <maxval | >minval»]
Threshold data in the active data group. Without an argument, thresh reports the current threshold settings. on and off toggle the thresholding on and off. datavar minval maxval selects data that only have datavar values between minval and maxval. Similarly, the thresholding range can be extended from the minimum value in the datavar up to some maxval in datavar <maxval or from some minval up to the maximum value in the datavar using datavar >minval. minval and maxval are always included in the resulting subset of data. Threshold settings can be saved in selection expressions that are defined using the sel command.
Example: Thresholding Data
See Also: only=, only+, only-, datavar, see, sel





txscale [size]
Set the size of the texture which sits on the polygon. A scale factor of 0.5 sets the texture to fit perfectly on the polygon if polysides is 4. If size is set too low, the texture will overflow the polygon size, causing a loss of part of the image. If size is set too large, then the texture will disappear. The default value is 0.5.
Example: Scaling Textures
See Also: texture Data Command, texture Control Command, polysize, polysides





update
Use update to manually update the display. This is probably only useful from subprocesses invoked via the async command.





version
Reports the version number for Partiview, as well as copyright information.





w[here]
Use the command where to generate a report on the current position and viewing angles. The report takes the form:
camera at x  y  z
looking to $ \hat{{x}}$  $ \hat{{y}}$  $ \hat{{z}}$
jump x  y  z  Rx  Ry  Rz  scale
c2w: axx  axy  axz  0  ayx  ayy  ayz  0  azx  azy  azz  0  x  y  z  1
where x, y, z are the values of your current position, $ \hat{{x}}$,$ \hat{{y}}$,$ \hat{{z}}$ are unit vectors that describe the forward direction vector relative to the world coordinates, Rx, Ry, Rz are the rotation angles about the x, y, and z axes, and the c2w aij coefficients describe a transformation matrix from camera (your view) to world coordinates.
Example: Determining Your Position
See Also: jump





winsize [xsize [ysize]] [±xpos±ypos]
Sets the size of the Graphics Window. Without any arguments, winsize reports the current size. With only one argument, the window size is set to xsize, preserving the current aspect ratio. Specifying xsize and ysize sets the window size explicitly. The ±xpos and ±ypos arguments set the location of the window on your screen. Positive values are measured from the top/left corner, negative values are measured from the bottom/right corner. Positive and negative values can be mixed; for example, -0+0 will place the window in the top/right corner. Note that specifying a ypos of +0 will place the top of the window off screen--the top of the GUI will be placed in the top/left corner. Use this command with detach to customize your display.
Example: Resizing the Graphics Window
See Also: detach

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