Next Previous Contents

4. Commands

There are two types of commands in partiview: Control Commands and Data Commands. Probably the most important difference between the two is that Control Commands return feedback to the user, whereas Data Commands are interpreted "as is". Control Commands are entered in the command window. But once in Control Command mode, you can still let commands become Data Commands (using the add Control Command, and in Data Command mode one can let a command be a Control Command by preceding it with the eval command. Before we explain the two types of Commands in more detail, a few other concepts are needed:

4.1 Textures

4.2 Coordinates and Coordinate Transformations

4.3 Grouping of objects

While the data are being read, particles can be grouped in different object groups, each of which can be manipulated and displayed on its own. The Group Row, if present, allows easy access to the different groups.

4.4 Control Commands

(see partibrains.c::specks_parse_args)

Most (all?) commands can be prefixed with a generic group designation, gN, to which this command applies. See the object Data Command how to place different data in different groups.

Data Commands can also be given, if prefixed with the add command.

read specks-file>

read a specks file

include

NOTYET, does the same as the read command.

on

off

enable

see the on command.

disable

see the off command.

eval control-command

This should be a no-op, since it would normally allow you to give a Control Command in Data Command mode.

add data-command

This will enter a Data Command while in Control Command mode.

async unix-command

This will allow you to execute an arbitrary unix command, the subprocess of which its stdout will be taken as a stream of Control Commands.

update

Ensures the screen is updated.

hist datavar [-l] [-c] [-t] [minval] [maxval]

Generates a histogram of values of the datafield named by dataval.

-l logarithmic, -c clipped, -t threshed.

bound

Reports 3D extent of the data

speed

(note that fspeed has been deprecated)

run

fade

clipbox [cb] ....

Selects a 3D clipbox

xmin ymin zmin xmax ymax zmax

xcen,ycen,zcen xrad,yrad,zrad

on

off

object

tfm

bgcolor

kiractl

viewing control options for kira (starlab) formatted data that have been read in with the kira Data Command.

{node|ring} {on|off|root}

tree {on|off|cross|tick} [tickscale]

size fac

span minpix maxpix

track id

??? scale

gN control-command

Generic prefix to any control command to act on the selected group gN (N=1,2,3,....).

BEGIN !CAVEMENU (virdir emulation)

stereo float color

Add stereo separation. Numbers can be 0.02 to 0.1 or -0.02 to -0.1 to swap eyes.

snapset FILESTEM [FRAMENO]

set snapshot parameters

snapshot [FRAMENO]

take a snapshot of the current viewport (uses convert(1))

move on|off

move-objects on|off

clip NEAR FAR

Set or get clipping distances

ortho

NOTYET

fov float

Get or set field of view (in degrees)

fovy float

Get or set field of view (in degrees)

focal float

Get or set the focal length. Use the 's' key to toggle stereo display. The focal length also determines the fly/tran speed.

jump [X Y Z] [Rx Ry Rz]

Get or set the current position (XYZ) and/or viewing (RxRyRz) angle.

center [X Y Z]

Get or set the current rotation center (XYZ) for orbit/rotate

rdata

Read a (.wf) file describing a path through space.

readpath

Read a Wavefront (.wf) file describing a path through space.

play speed[f]

Play the currently loaded path, at speed times normal speed (with "f" suffice it would play every speed-th frame).

frame frameno

Get, or set the current frame the frameno-th.

int[erest] [X Y Z Radius]

Get or set region of interest

cen[ter] [X Y Z Radius]

Get or set region of interest

censize RADIUS

Get or set size of marker / interest-marker size

END !CAVEMENU (virdir emulation)

step [step-number]

This either reports at which step you are, or changes the view to the selected step-number. If preceded with a plus or minus sign, the step is relative to the current frame.

fwd

gscale

scaling particles

clearobj

every N

Get or set the value to display every N-th particle

color

datavar [dv]

datawait on|off

lum

cmap filename

Load (ascii) filename with RGB values

boxcmap

cment

boxcment

only

thresh

rawdump

slum

scale-lum

see

show

showbox

hide

hidebox

box(es) [off|ON|ONLY]

Toggle box display between off, ON, or ONLY. (notice case sensitivity)

boxlabel [on|off]

Toggle or set box label display mode.

boxaxes [on|off]

Toggle or set box axes display mode.

boxscale [float] [on|off]

go

gobox

goboxscale

psize [float]

(Note: pointsize is deprecated)

polysize [on|off] [a|s|r]

polylum

polyminpixels

labelminpixels

labelsize

lsize

point(s) [on|off]

Toggle the display status of points (the point status in the top row), or explicitely set point display on or off.

poly(gon) [on|off]

Toggle the display status of labels (the poly status in the top row), or explicitely set polygon display on or off.

texture [on|off]

Toggle the display status of textures (the tex status in the top row), or explicitely set textures on or off.

label(s) [on|off]

Toggle the display status of labels (the lbl status in the top row), or explicitely set labels on or off.

txscale

polyorivar

texturevar

laxes [on|off]

Toggle ...

polyside(s)

Number of sides a polygon should have

gamma

alpha [float]

Get or set the alpha value.

fast

see also ptsize

ptsize

makes more sense than fast.

fog

menu fmenu

BEGIN CAVEMENU pos P1 P2 wall P1 hid [P1] show [P1] h [P1] demandfps [P1] font help ? END CAVEMENU

datascale

where [w]

4.5 Data commands

(see also partibrains.c::specks_read)

Lines starting with # will be skipped. The following Data Commands can be placed in a data file.

Control Commands can be given, if prefixed with the eval command.

read file

read a speck formatted file. Recursive, commands can nest. (strtok ok??)

include file

read a speck formatted file.

ieee [-t time] file

read a IEEEIO formatted file, with optional timestep number (0 based). Support for this type of data must be explicitly compiled into the program.

kira file

read a kira formatted file. See the kiractl Control Command to modify the looks of the objects.

object gN=ALIAS

Defines/Selects a particular group number (N=1,2,3....) to an ALIAS. In command mode you can use gN=ALIAS. Any data following this command will now belong to this group.

object ObjectName

Select an existing group. Following data will now belong to this group.

sdbvars var

Choose which data fields to extract from binary sdb files (any of: mMcrogtxyzSn) for subsequent sbd commands.

sdb [-t time] file

Read an SDB (binary) formatted file, with optional timestep number (0 based).

box[es] ....

Draw a box, using any of the following formats:

xmin ymin zmin xmax ymax zmax

xmin,xmax ymin,ymax zmin,zmax

xcen,ycen,zcen xrad,yrad,zrad

[-t time] [-n boxno] [-l level] xcen,ycen,zcen xrad,yrad,zrad

level determines color.

annot [-t timestep] string ...

tfm

Object-to-world transformation. Either tx ty tz rx ry rz or 16 numbers for 4x4 matrix. (something> must contain * h p r)

eval command

execute a Control Command.

feed command

Synonymous for eval

VIRDIR command

Synonymous for eval

filepath path

A colon separate list of directories in which datafiles will be searched for. If preceded with the + symbol, this list will be appended to the current filepath.

texture [-lmnMDB] txno file.sgi

-l(inear)

-m(ipmap)

-n(earest)

-M(odulate)

-D(ecal)

-B(lend)

polyorivar

This will control the positions in space of polygons, as you rotate the world.

texturevar

coord name ... 16 world-to-coord tfm floats (GL order)

dataset indexno datasetname

indexno is an integer, 0 being the first one.

datavar indexno string float float

Name this variable.

datatime time

Label subsequent data with this time (a floating point number).

Xpos Ypos Zpos Var0 ....

These lines, with XYZ positions in the first 3 columns, will make up the bulk of the dataset. The 4th and subsequent columns contain the values of the datavariables as named with the datavar commands. Note that data variables are 0-based.


Next Previous Contents