-
slevy authored
Update FLTK. Avoid mentioning fltk 2.0 since it probably doesn't work. Try using <verb> around code blocks; with sgml2latex, <code> places ugly horizontal rules around the blocks and misplaces them so that they crop some of the text. Describe "detach" command and new cross-eyed stereo feature. Describe thresh, only=/only-/only+, see and sel commands. But really need a separate section about how selection sets should work. (Maybe writing the section will make it clear how they *should* work.) Add "thresh" example. Look at stellar distribution by B-V -- the Orion spur really does show up in blue! Describe transform syntax including "tfm camera", making multiplication order explicit. Describe colormap file syntax in new section. Document "cment" & "vcmap" cmds.
slevy authoredUpdate FLTK. Avoid mentioning fltk 2.0 since it probably doesn't work. Try using <verb> around code blocks; with sgml2latex, <code> places ugly horizontal rules around the blocks and misplaces them so that they crop some of the text. Describe "detach" command and new cross-eyed stereo feature. Describe thresh, only=/only-/only+, see and sel commands. But really need a separate section about how selection sets should work. (Maybe writing the section will make it clear how they *should* work.) Add "thresh" example. Look at stellar distribution by B-V -- the Orion spur really does show up in blue! Describe transform syntax including "tfm camera", making multiplication order explicit. Describe colormap file syntax in new section. Document "cment" & "vcmap" cmds.
partiview-4.html 50.72 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE> Partiview (PC-VirDir): Commands</TITLE>
<LINK HREF="partiview-5.html" REL=next>
<LINK HREF="partiview-3.html" REL=previous>
<LINK HREF="partiview.html#toc4" REL=contents>
</HEAD>
<BODY>
<A HREF="partiview-5.html">Next</A>
<A HREF="partiview-3.html">Previous</A>
<A HREF="partiview.html#toc4">Contents</A>
<HR>
<H2><A NAME="s4">4. Commands</A></H2>
<P>There are two types of commands in <CODE>partiview</CODE>:
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 without comment. The command window expects
to receive Control Commands. However, it is possible to
enter a Data Command where a Control Command is expected,
using the <CODE>add</CODE> command prefix. Likewise, a Control Command
may be given where data is expected, using the <CODE>eval</CODE> prefix,
e.g. in a data (or .cf) file. The <CODE>real</CODE> (Control) Command expects
data commands, but if Control Commands are needed, they need to be preceded
with the <CODE>eval</CODE> command. See also the previous <B>starlab</B> example.
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<H2><A NAME="ss4.1">4.1 Control Commands</A>
</H2>
<P>
<P>(see partibrains.c::specks_parse_args)
<P>Control Commands are accepted in the Command window, and in some other contexts.
Generally, <CODE>partiview</CODE> gives a response to every Control Command,
reporting the (possibly changed) status.
<P>Typically, if parameters are omitted, the current state is reported.
<P>Some commands apply to particles in the current group (see Object group commands);
others affect global things, such as time or display settings.
<P>Data Commands can also be given, if prefixed with <CODE>add</CODE>.
<P>
<P>
<H2><A NAME="ss4.2">4.2 I/O Control Commands</A>
</H2>
<P>
<P>
<DL>
<DT><B>read <I>specks-file</I></B><DD><P>Read a file containing Data Commands (typical suffix <CODE>.cf</CODE> or <CODE>.speck</CODE>).
<P>
<P>
<DT><B>async <I>unix-command</I></B><DD><P>Run an arbitrary unix command (invoked via /bin/sh) as a subprocess of <CODE>partiview</CODE>.
Its standard output is interpreted as a stream of control commands.
Thus <CODE>partiview</CODE> can be driven externally, e.g. to record an animation
(using the <CODE>snapshot</CODE> command), or to provide additional GUI controls.
Several <CODE>async</CODE> commands can run concurrently.
Examples are given later. Warning: you cannot interrupt a started command,
short of hitting ESC to exit partiview.
<P>
<DT><B>add <I>data-command</I></B><DD><P>Enter a Data Command where a Control Command is expected,
e.g. in the text input box. For example,
<PRE>
add 10 15 -1 text blah
</PRE>
adds a new label "blah" at 10 15 -1, or
<PRE>
add kira myrun.out
</PRE>
loads a kira (starlab) output file.
<P>
<DT><B>eval <I>control-command</I></B><DD><P>Processes that control command just as if the <CODE>eval</CODE> prefix weren't there.
Provided for symmetry: wherever either a control command or a data command
is expected, entering <CODE>eval</CODE> <I>control-command</I> ensures that it's
taken as a control command.
<P>
<P>
<DT><B>add filepath (data-command)</B><DD><P>Determines the list of directories where all data files, color maps, etc.
are sought. See the <CODE>filepath</CODE> entry under
Data Commands.
<P>
<P>
</DL>
<P>
<H2><A NAME="ss4.3">4.3 Object Group Control Commands</A>
</H2>
<P><CODE>Partiview</CODE> can load multiple groups of particles,
each with independent display settings, colormaps, etc.
When more than one group is loaded, the Group Row appears on the GUI,
with one toggle-button for each group. Toggling the button turns
display of that group on or off. Right-clicking turns the group unconditionally on,
and selects that group as the current one for other GUI controls.
<P>Many Control Commands apply to the <I>currently selected</I> group.
<P>Groups always have names of the form g<I>N</I> for some small positive <I>N</I>;
each group may also have an alias.
<P>
<DL>
<DT><B>g<I>N</I> </B><DD><P>Select group g<I>N</I>. Create a new group if it doesn't already exist.
<P>
<DT><B>g<I>N</I>=<I>alias</I> </B><DD><P>Assign name <I>alias</I> to group g<I>N</I>.
Note there must be no blanks around the <CODE>=</CODE> sign.
<P>
<DT><B>object <I>objectname</I></B><DD><P>Likewise, select object <I>objectname</I>, which may be either an alias name
or g<I>N</I>.
<P>
<DT><B>g<I>N</I> <I>control-command</I></B><DD><P>
<DT><B>object <I>objectname</I> <I>control-command</I></B><DD><P>Either form may be used as a <I>prefix</I> to any control command
to act on the specified group, e.g. <CODE>object fred poly on</CODE>
<P>
<DT><B>gall <I>control-command</I></B><DD><P>Invoke the given <I>control-command</I> in all groups.
For example, to turn display of group 3 on and all others off, use:
<BLOCKQUOTE><CODE>
<PRE>
gall off
g3 on
</PRE>
</CODE></BLOCKQUOTE>
<P>
<DT><B>on</B><DD><P>
<DT><B>enable</B><DD><P>Either one will
enable the display of the currently selected group (as it is by default).
<P>
<DT><B>off</B><DD><P>
<DT><B>disable</B><DD><P>Either one will turn off the display of the current group.
<P>
</DL>
<P>
<H2><A NAME="ss4.4">4.4 View Control commands</A>
</H2>
<P>View commands affect the view; they aren't specific to data groups.
<P>
<DL>
<DT><B>fov <I>float</I></B><DD><P>Angular field of view (in degrees) in Y-direction.
<P>
<DT><B>cen[ter] <I>X Y Z</I> [<I>RADIUS</I>]</B><DD><P>Set point of interest. This is the center of rotation in
<CODE>[o]rbit</CODE> and <CODE>[r]otate</CODE> modes. Also, in <CODE>[o]rbit</CODE> mode,
translation speed is proportional to the viewer's distance from this point.
The optional <I>RADIUS</I> (also set by <CODE>censize</CODE>) determines the size
of the marker crosshair, initially 1 unit.
<P>
<DT><B>cen[ter] [<I>X Y Z</I> [<I>RADIUS</I>]]
int[erest] [<I>X Y Z</I> [<I>RADIUS</I>]]</B><DD><P>Set point of interest. This is the center of rotation in
<CODE>[o]rbit</CODE> and <CODE>[r]otate</CODE> modes. And, in <CODE>[o]rbit</CODE> mode,
translation speed is proportional to the viewer's distance from this point.
The optional <I>RADIUS</I> (also set by <CODE>censize</CODE>) determines the size
of the marker crosshair, initially 1 unit.
<P>**** why is center/interest commented out in the first example. Originally
this command was documented twice, the first one has /interest commented out.
<P>
<DT><B>censize [<I>RADIUS</I>]</B><DD><P>Set size of point-of-interest marker.
<P>
<DT><B>where <I>(also)</I> w</B><DD><P>Report the 3-D camera position and forward direction vector.
<P>
<DT><B>clip <I>NEAR</I> <I>FAR</I></B><DD><P>Clipping distances. The computer graphics setup always requires
drawing only objects in some finite range of distances in front of the
viewpoint. Both values must be strictly positive, and their ratio
is limited; depending on the graphics system in use, distant objects
may appear to blink if the <I>FAR</I>/<I>NEAR</I> ratio exceeds 10000 or so.
<P>To set the far clip range without changing the near, use a non-numeric
near clip value, e.g. <CODE>clip - 1000</CODE>.
<P>
<P>
<DT><B>jump [<I>X Y Z</I>] [<I>Rx Ry Rz</I>]</B><DD><P>Get or set the current position (XYZ) and/or viewing (RxRyRz) angle.
<P>
<DT><B>readpath</B><DD><P>Read a Wavefront (<CODE>.wf</CODE>) file describing a path through space.
<P>
<DT><B>rdata</B><DD><P>Synonym for readpath.
<P>
<DT><B>play <I>speed</I>[f]</B><DD><P>Play the currently loaded (from <CODE>readpath</CODE>/<CODE>rdata</CODE>) camera animation
path, at <I>speed</I> times normal speed,
skipping frames as needed to keep up with wall-clock time.
(Normal speed is 30 frames per second.)
With "f" suffix, displays every <I>speed</I>-th frame, without regard to real
time.
<P>
<DT><B>frame [<I>frameno</I>]</B><DD><P>Get or set the current frame the <I>frameno</I>-th.
<P>
<DT><B>update </B><DD><P>Ensures the display is updated, as before taking a snapshot.
Probably only useful in a stream of control commands from an <CODE>async</CODE>
subprocess.
<P>
<DT><B>winsize [<I>XSIZE</I> [<I>YSIZE</I>]]</B><DD><P>
<DT><B>winsize <I>XSIZE</I>x<I>YSIZE</I>+<I>XPOS</I>+<I>YPOS</I></B><DD><P>Resize graphics window. With no arguments, reports current size.
With one argument, resizes to given width, preserving aspect ratio.
With two arguments, reshapes window to that height and width.
With complete X geometry specification (no embedded spaces),
e.g. <CODE>winsize 400x350+20-10</CODE>,
also sets position of graphics window, with +X and +Y measured from
left/top, -X and -Y measured from right/bottom of screen.
<P>
<DT><B>detach [full|hide] [<I>+XPOS+YPOS</I>]</B><DD><P>Detach graphics window from GUI control strip and optionally
specify position of control strip. With <CODE>full</CODE> or <CODE>hide</CODE>,
makes graphics window full-screen with GUI visible or hidden, respectively.
With neither <CODE>full</CODE> nor <CODE>hide</CODE>, the graphics window
is detached but left at its current size.
<P>The <I>+XPOS+YPOS</I> is a window position in X window geometry style,
so e.g. <CODE>detach full -10+5</CODE> places the GUI near the
upper right corner of the screen, 10 pixels in from the right
and 5 pixels down from the top edge.
<P>If you don't mind typing blindly, it's still possible to enter
text-box commands even with the controls hidden;
press the <I>Tab</I> key before each command to ensure that
input focus is in the text box.
Use <I>Tab</I><CODE>detach full</CODE><I>Enter</I>
to un-hide a hidden control strip.
<P>
<DT><B>bgcolor <I>R G B</I></B><DD><P>Set window background color (three R G B numbers or one grayscale value).
<P>
<P>
<DT><B>focallen <I>distance</I></B><DD><P>Focal length: distance from viewer to a typical object of interest.
This affects stereo display (see below) and navigation: the speed of
motion in <CODE>[t]ranslate</CODE> and <CODE>[f]ly</CODE> modes is proportional to this
distance.
<P>
<DT><B>stereo [on|off|redcyan|glasses|cross|left|right] [<I>separation</I>]</B><DD><P>Stereo display. Also toggled on/off by typing <CODE>'s'</CODE> key in graphics window.
Where hardware allows it, <CODE>stereo glasses</CODE> selects
CrystalEyes-style quad-buffered stereo. All systems should be capable of
<CODE>stereo redcyan</CODE>, which requires wearing red/green or red/blue glasses,
and of <CODE>cross</CODE> (crosseyed), which splits the window horizontally.
<CODE>left</CODE> and <CODE>right</CODE> show just that eye's view,
and may be handy for taking stereo snapshots.
<P>Useful <I>separation</I> values might be 0.02 to 0.1, or -0.02 to -0.1 to swap
eyes. See also <CODE>focallen</CODE> command, which gives the distance to
a typical object of interest: left- and right-eye images of an object
at that distance will coincide on the screen.
<P>Virtual-world eyes will be separated by distance
2 * <I>focallen * separation</I>, with convergence angle
2 * <CODE>arctan(</CODE><I>separation</I><CODE>)</CODE>.
<P>See also the <CODE>winsize</CODE> and <CODE>detach</CODE> commands
for control over graphics window size and placement.
<P>Beware: some systems which support hardware ("glasses")
stereo also require that the display be set to a
stereo-capable video mode. Partiview does not do this
automatically. For example, on stereo-capable SGI Irix systems,
you may need to type (to a unix shell)
<CODE>/usr/gfx/setmon -n 1024x768_96s</CODE> to allow
stereo viewing and something like <CODE>/usr/gfx/setmon -n 72</CODE>
to revert. Otherwise, turning partiview's stereo on
will just show the left eye's view -- displacing the viewpoint
but nothing else.
<P>
<DT><B>snapset [<CODE>-n</CODE> <I>FRAMENO</I>] <I>FILESTEM</I> [<I>FRAMENO</I>]</B><DD><P>Set parameters for future <CODE>snapshot</CODE> commands.
<I>FILESTEM</I> may be a printf format string with frame number as
argument, e.g. <CODE>snapset pix/%04d.ppm</CODE>, generating image names
of <CODE>pix/0000.ppm</CODE>, <CODE>pix/0001.ppm</CODE>, etc.
If <I>FILESTEM</I> contains no % sign, then <CODE>.%03d.ppm.gz</CODE> is
appended to it, so <CODE>snapset ./pix/fred</CODE>
yields snapshot images named <CODE>./pix/fred.000.ppm.gz</CODE> etc.
<P>Frame number <I>FRAMENO</I> (default 0) increments with each snapshot taken.
<P>
<P>
<DT><B>snapshot [<I>FRAMENO</I>]</B><DD><P>Capture a snapshot image of the current view.
Use <CODE>snapset</CODE> to specify the output image name.
Default format is <CODE>snap.%03d.tif</CODE>.
<P><CODE>Partiview</CODE> generally invokes the ImageMagick program <CODE>convert(1)</CODE>,
which must be installed and be on the user's $PATH. <CODE>Convert</CODE> determines
the type of image (jpeg, sgi, bmp, etc.) based on the file suffix.
<P><CODE>Convert</CODE> is not needed if the <CODE>snapset</CODE> <I>FILESTEM</I> ends in
<CODE>.ppm.gz</CODE> (invokes gzip rather than convert) or <CODE>.ppm</CODE>
(no external program required).
<P>
</DL>
<P>
<P>
<H2><A NAME="ss4.5">4.5 Particle Display Control Commands</A>
</H2>
<P>These commands affect how particles (in the current group) are
displayed.
<P>
<DL>
<DT><B>psize <I>scalefactor</I></B><DD><P>All particle luminosities (as specified by <CODE>lum</CODE> command)
are scaled by the product of two factors:
a <I>lumvar</I>-specific factor given by <CODE>slum</CODE>,
and a global factor given by <CODE>psize</CODE>.
So the intrinsic brightness of a particle is
<I>value-specified-by-</I><CODE>lum</CODE>
* <I>slum-for-current-lumvar</I>
* <I>psize-scalefactor</I>.
<P>
<DT><B>slum <I>slumfactor</I></B><DD><P>Data-field specific luminosity scale factor, for current choice of
<I>lumvar</I> as given by the <CODE>lum</CODE> command.
A <I>slumfactor</I> is recorded independently for each data field, so
if data fields <CODE>mass</CODE> and <CODE>energy</CODE> were defined, one might say
<BLOCKQUOTE><CODE>
<PRE>
lum mass
slum 1000
lum energy
slum 0.25
</PRE>
</CODE></BLOCKQUOTE>
having chosen each variable's <I>slumfactor</I> for useful display,
and then freely switch between <CODE>lum mass</CODE> and <CODE>lum energy</CODE>
without having to readjust particle brightness each time.
<P>
<P>
<DT><B>ptsize <I>minpixels</I> <I>maxpixels</I></B><DD><P>Specifies the range of <I>apparent</I> sizes of points,
in pixels. Typical values might be <CODE>ptsize 0.1 5</CODE>.
The graphics system may silently impose an upper limit
of about 10 pixels.
<P>
<P>
<DT><B>polysize [on|off] [a|s|r]</B><DD><P>
<DT><B>polylum</B><DD><P>
<DT><B>polyminpixels</B><DD><P>
<DT><B>polymin <I>minradius</I> [<I>maxradius</I>]</B><DD><P>
<DT><B>color</B><DD><P>Specify how particles are colored.
Generally, a linear function of some data field of each particle
becomes an index into a colormap (see <CODE>cmap</CODE>, <CODE>cment</CODE>).
<DL>
<DT><B> color <I>colorvar</I> [<I>minval maxval</I>] </B><DD><P>Use data field <I>colorvar</I> (either a name as set by <CODE>datavar</CODE>
or a 0-based integer column number) to determine color.
Map <I>minval</I> to color index 1, and <I>maxval</I> to
the next-to-last entry in the colormap (<I>Ncmap-2</I>).
The 0th and last (<I>Ncmap-1</I>) colormap entry are used for
out-of-range data values.
<P>If <I>minval</I> and <I>maxval</I> are omitted, the actual range of
values is used.
<P>
<DT><B> color <I>colorvar</I> exact [<I>baseval</I>] </B><DD><P>Don't consider field <I>colorvar</I> as a continuous variable;
instead, it's integer-valued, and mapped one-to-one with
color table slots. Data value <I>N</I> is mapped to
color index <I>N+baseval</I>.
<P>
<DT><B> color <I>colorvar</I> -exact </B><DD><P>Once the <CODE>exact</CODE> tag is set (for a particular data-field),
it's sticky. To interpret that data field as a continuous, scalable
variable again, use <CODE>-exact</CODE>.
<P>
<DT><B> color const <I>R G B</I> </B><DD><P>Show all particles as color <I>R G B</I>, each value in range 0 to 1,
independent of any data fields.
</DL>
<P>
<DT><B>lum</B><DD><P>Specify how particles' intrinsic luminosity is computed:
a linear function of some data field of each particle.
<DL>
<DT><B> lum <I>lumvar</I> [<I>minval maxval</I>] </B><DD><P>Map values of data field <I>lumvar</I> (<CODE>datavar</CODE> name or
field number) to luminosity.
The (linear) mapping takes field value <I>minval</I> to
luminosity 0 and <I>maxval</I> to luminosity 1.0.
<P>If <I>minval</I> and <I>maxval</I> are omitted,
the actual range of values is mapped to the luminosity range
0 to 1.
<P>Note that the resulting luminosities are then scaled by
the <CODE>psize</CODE> and <CODE>slum</CODE> scale factors, and further
scaled according to distance as specified by <CODE>fade</CODE>, to compute
apparent brightness of points.
<P>
<DT><B> lum const <I>L</I> </B><DD><P>Specify constant particle luminosity <I>L</I> independent of
any data field values.
</DL>
<P>
<DT><B>fade [planar|spherical|linear <I>refdist</I>|const <I>refdist</I>]</B><DD><P>Determines how distance affects particles' apparent brightness (or "size").
The default <CODE>fade planar</CODE> gives 1/r^2 light falloff, with r measured
as distance from the view plane. <CODE>fade spherical</CODE> is also 1/r^2,
but with r measured as true distance from the viewpoint.
<CODE>fade linear</CODE> <I>refdist</I> gives 1/r light falloff -- not physically
accurate, but useful to get a limited sense of depth.
<CODE>fade const</CODE> <I>refdist</I> gives constant apparent brightness
independent of distance, and may be appropriate for orthographic views.
<P>The <I>refdist</I> for linear and const modes is that distance <I>r</I>
at which apparent brightness should match that in the 1/r^2 modes --
a distance to a "typical" particle.
<P>
<DT><B>labelminpixels</B><DD><P>
<DT><B>labelsize</B><DD><P>
<DT><B>lsize</B><DD><P>
<DT><B>point[s] [on|off]</B><DD><P>Turn display of points on or off. With no argument, toggles display.
<P>
<DT><B>poly[gons] [on|off]</B><DD><P>Turn display of points on or off. With no argument, toggles display.
<P>
<DT><B>texture [on|off]</B><DD><P>Turn display of textures on or off. With no argument, toggles.
<P>
<DT><B>label[s] [on|off]</B><DD><P>Turn display of label text on or off. With no argument, toggles.
<P>
<P>
<DT><B>txscale <I>scalefactor</I></B><DD><P>Scale size of all textures relative to their polygons.
A scale factor of 0.5 (default) make the texture square
just fill its polygon, if <CODE>polysides</CODE> is 4.
<P>
<DT><B>polyorivar</B><DD><P>Report setting of <CODE>polyorivar</CODE> data-command, which see.
<P>
<DT><B>texturevar</B><DD><P>Report setting of <CODE>texturevar</CODE> data-command, which see.
<P>
<DT><B>laxes [on|off]</B><DD><P>Toggle label axes. When on, and when labels are displayed,
shows a
<P>
<DT><B>polyside(s)</B><DD><P>Number of sides a polygon should have. Default 11, for fairly round
polygons. For textured polygons, <CODE>polysides 4</CODE> might do as well,
and be slightly speedier.
<P>
<DT><B>fast</B><DD><P>see also <CODE>ptsize</CODE>
<P>
<DT><B>ptsize <I>minpixels</I> [<I>maxpixels</I>]</B><DD><P>Specifies range of apparent (pixel) size of points.
Those with computed sizes (based on luminosity
and distance) smaller than <I>minpixels</I> are
randomly (but repeatably) subsampled -- i.e. some
fraction of them are not drawn. Those computed to be
larger than <I>maxpixels</I> are drawn at size
<I>maxpixels</I>.
<P>
<DT><B>gamma <I>displaygamma</I></B><DD><P>Tells the particle renderer how the display + OpenGL
relates image values to visible lightness.
You don't need to change this, but may adjust it
to minimize the brightness glitches when particles change size.
Typical values are <CODE>gamma 1</CODE> through <CODE>gamma 2.5</CODE> or so.
Larger values raise the apparent brightness of dim things.
<P>
<DT><B>alpha <I>alpha</I></B><DD><P>Get or set the alpha value, in the range 0 to 1; it determines
the opacity of polygons.
<P>
<DT><B>speed</B><DD><P>For time-dependent data, advance datatime by this many time units
per wall-clock second.
<P>
<DT><B>step [<I>timestep</I>]</B><DD><P>For time-varying data, sets current timestep number.
Real-valued times are meaningful for some kinds of data including those
from Starlab/kira; for others, times are rounded to nearest integer.
If running, <CODE>step</CODE> also stops datatime animation. (See <CODE>run</CODE>.)
<P>
<DT><B>step [+|-]<I>deltatimestep</I></B><DD><P>If preceded with a plus or minus sign, adds that amount to current time.
<P>
<P>(note that <CODE>fspeed</CODE> has been deprecated)
<P>
<DT><B>run</B><DD><P>Continue a stopped animation (see also <CODE>step</CODE>).
<P>
<DT><B>tfm [-v] [<I>numbers...</I>]</B><DD><P>Object-to-world transformation.
May take 1, 6, 7, 9 or 16 parameters: either
<I>scalefactor</I>,
or <I>tx ty tz rx ry rz </I><I>scalefactor</I>>],
or 16 numbers for 4x4 matrix,
or 9 numbers for 3x3 matrix.
See <I>Coordinates and Coordinate Transformations</I>.
<P>With no numeric parameters, reports the current object-to-world transform.
Use <CODE>tfm -v</CODE> to see the transform and its inverse in several forms.
<P>
<DT><B>move [g<I>N</I>] {on|off}</B><DD><P>Normally, navigation modes <CODE>[r]otate</CODE> and <CODE>[t]ranslate</CODE>
just adjust the viewpoint (camera). However,
if you turn <CODE>move on</CODE>, then <CODE>[r]otate</CODE> and <CODE>[t]ranslate</CODE>
move the currently-selected object group instead,
e.g. to adjust its alignment relative to other groups.
(<CODE>[o]rbit</CODE> and <CODE>[f]ly</CODE> modes always move the camera.)
<P>To indicate that <CODE>move</CODE> mode is enabled,
the control strip shows the selected group's name in
bold italics, as <B><I>[g3]</I></B>.
Use <CODE>move off</CODE> to revert to normal.
The <CODE>tfm</CODE> command reports the current object-group-to-global-world
transformation.
<P>
<DT><B>fwd</B><DD><P>
<DT><B>datawait on|off</B><DD><P>For asynchronously-loaded data (currently only <CODE>ieee</CODE> data command),
say whether wait for current data step to be loaded.
(If not, then keep displaying previous data while loading new.)
<P>
<DT><B>cmap <I>filename</I></B><DD><P>Load (ascii) filename with RGB values, for coloring particles.
The <CODE>color</CODE> command selects which data field is mapped to color index
and how.
<P>Colormaps are text files, beginning with a number-of-entries
line and followed by R G B or R G B A entries one per line;
see the <I>Colormaps</I> section.
<P>
<DT><B>vcmap -v <I>fieldname</I> <I>filename</I></B><DD><P>Load colormap as with <CODE>cmap</CODE> command. But use this colormap
only when the given data field is selected for coloring.
Thus the <CODE>cmap</CODE> color map applies to all data fields for which
no <CODE>vcmap</CODE> has ever been specified.
<P>
<DT><B>cment <I>colorindex</I> [<I>R G B</I>]</B><DD><P>Report or set that colormap entry.
<P>
<DT><B>rawdump <I>dump-filename</I></B><DD><P>All particle attributes (not positions though)
are written to a <I>dump-filename</I>. Useful for debugging.
Warning: it will happily overwrite an existing file with that name.
<P>
<P>
</DL>
<P>
<H2><A NAME="ss4.6">4.6 Particle subsetting & statistics</A>
</H2>
<P>
<P>
<DL>
<P>
<DT><B>clipbox ...</B><DD><P>see <CODE>cb</CODE> below.
<P>
<DT><B>cb ....</B><DD><P>Display only a 3D subregion of the data -- the part lying within the clipbox.
<DL>
<DT><B>cb <I>xmin ymin zmin xmax ymax zmax</I> </B><DD><P>Specified by coordinate ranges.
Note only spaces are used to separate the 6 numbers.
<DT><B>cb <I>xcen,ycen,zcen xrad,yrad,zrad</I> </B><DD><P>Specified by center and "radius" of the box.
Note no spaces after the commas!
<DT><B>cb <I>xmin,xmax ymin,ymax zmin,zmax</I> </B><DD><P>Specified by coordinate ranges.
<DT><B>cb <CODE>off</CODE> </B><DD><P>Disable clipping. The entire dataset is again visible.
<DT><B>cb <CODE>on</CODE> </B><DD><P>Re-enable a previously defined clipbox setting. It will also
display the clipbox again
<DT><B>cb <CODE>hide</CODE> </B><DD><P>Hide the clipbox, but still discard objects whose centers
lie outside it.
</DL>
Note this command does not toggle clipping
if no arguments given (that would be handy
and more in line with similar commands).
If no arguments given, it reports the current clipbox.
<P>
<DT><B>thresh</B><DD><P>Display a subset of particles, chosen by the value of
some data field. Each <CODE>thresh</CODE> command overrides
settings from previous commands, so it cannot be used to
show unions or intersections of multiple criteria.
For that, see the <CODE>only</CODE> command. However, unlike <CODE>only</CODE>,
the <CODE>thresh</CODE> criterion applies to time-varying data.
<DL>
<DT><B>thresh <I>field</I> <I>minval</I> <I>maxval</I> </B><DD><P>Display only those particles where
<I>minval</I> <= field <I>field</I> <= <I>maxval</I>.
The <I>field</I> may be given by name (as from <CODE>datavar</CODE>)
or by field number.
<DT><B>thresh <I>field</I> <CODE><</CODE><I>maxval</I> </B><DD><P>
<DT><B>thresh <I>field</I> <CODE>></CODE><I>minval</I> </B><DD><P>Show only particles where <I>field</I> is <=
or >= the given threshold.
<DT><B>thresh [off|on]</B><DD><P>Disable or re-enable a previously specified threshold.
</DL>
<P>
<DT><B>only= <I>datafield</I> <I>value</I> <I>minvalue-maxvalue</I> <<I>value</I> ><I>value</I> ...</B><DD><P>
<DT><B>only+ <I>datafield</I> <I>value</I> <I>minvalue-maxvalue</I> <<I>value</I> ><I>value</I> ...</B><DD><P>
<DT><B>only- <I>datafield</I> <I>value</I> <I>minvalue-maxvalue</I> <<I>value</I> ><I>value</I> ...</B><DD><P>Scans particles (in the current timestep only!), finding those where
<I>datafield</I> has value <I>value</I>, or has a value in range
<I>minvalue</I> <= value <= <I>maxvalue</I>, or whatever.
Multiple value-ranges may be specified to select the union of several sets.
The resulting set of particles is assigned to (<CODE>only=</CODE>), added to
(<CODE>only+</CODE>) or subtracted from (<CODE>only-</CODE>) the <CODE>thresh</CODE> selection-set.
Also display just particles in that selection-set, as if <CODE>see thresh</CODE>
had been typed.
<P>The net effect is illustrated by these examples:
<DL>
<DT><B>only= type 1-3 5</B><DD><P>Show only particles of type 1, 2, 3 or 5.
<DT><B>only- mass <2.3 >3.5</B><DD><P>After the above command, shows only the subset
of type 1/2/3/5 particles AND have mass between 2.3 and 3.5.
(Note that to take the intersection of two conditions,
you must subtract the complement of the latter one.
Maybe some day there'll be an <CODE>only&</CODE>.
</DL>
<P>
<DT><B>see <CODE>selexpr</CODE></B><DD><P>Show just those particles in the selection-set <CODE>selexpr</CODE>.
Predefined set names are <CODE>all</CODE>, <CODE>none</CODE>, <CODE>thresh</CODE> and <CODE>pick</CODE>,
and other names may be defined by the <CODE>sel</CODE> command.
The default is <CODE>see all</CODE>. Using the <CODE>thresh</CODE> or <CODE>only</CODE>
commands automatically switch to displaying <CODE>see thresh</CODE>.
<P>Note that you can see the complement of a named set,
e.g. all except the <CODE>thresh</CODE>-selected objects, with
<CODE>see -thresh</CODE>.
<P>
<DT><B>sel <CODE>selname = selexpr</CODE></B><DD><P>Compute a logical combination of selection-sets and assign them
to another such set. The set membership is originally assigned by
<CODE>thresh</CODE> or <CODE>only</CODE> commands. Yeah, I know this doesn't make sense.
Need a separate section to document selection-sets.
<P>
<DT><B>sel <CODE>selexpr</CODE></B><DD><P>Count the number of particles in the selection-set <CODE>selexpr</CODE>.
<P>
<DT><B>clearobj</B><DD><P>Erase all particles in this group. Useful for reloading on the fly.
<P>
<DT><B>every <I>N</I></B><DD><P>Display a random subset (every <I>N</I>-th) of all particles.
E.g. <CODE>every 1</CODE> shows all particles, <CODE>every 2</CODE> shows about half of them.
Reports current subsampling factor, and the current total number of particles.
<P>
<DT><B>hist <I>datafield</I> [-n <I>nbuckets</I>] [-l] [-c] [-t] [<I>minval</I>] [<I>maxval</I>]</B><DD><P>Generates a (numerical) histogram of values of <I>datafield</I>,
which may be a named field (as from <CODE>datavar</CODE>) or a field index.
Divides the value range (either <I>minval</I>..<I>maxval</I>
or the actual range of values for that field) into <I>nbuckets</I>
equal buckets (11 by default). Uses logarithmically-spaced
intervals if <CODE>-l</CODE> (so long as the data range doesn't include zero).
If a clipbox is defined, use <CODE>-c</CODE> to count only
particles within it. If a <CODE>thresh</CODE> or <CODE>only</CODE>
subset is defined, use <CODE>-t</CODE> to count only the chosen subset.
<P>
<DT><B>bound [w]</B><DD><P>Reports 3D extent of the data. With <CODE>w</CODE>, reports it in
world coordinates, otherwise in object coordinates.
<P>
<DT><B>datavar</B><DD><P>
<DT><B>dv</B><DD><P>Report names and value ranges (over all particles in current group)
of all named data fields.
<P>
<P>
</DL>
<P>
<H2><A NAME="ss4.7">4.7 Boxes</A>
</H2>
<P>
<DL>
<DT><B>showbox <I>list of integer box level numbers...</I></B><DD><P>
<DT><B>hidebox <I>list of integer box level numbers...</I></B><DD><P>
<DT><B>box[es] [off|on|only]</B><DD><P>Turn box display off or on; or display boxes but hide all particles.
<P>
<DT><B>boxcmap <I>filename</I></B><DD><P>Color boxes using that colormap.
Each box's level number (set by <CODE>-l</CODE> option of <CODE>box</CODE> data-command,
default 0) is the color index.
<P>
<DT><B>boxcment <I>colorindex</I> [<I>R G B</I>]</B><DD><P>Get or set the given box-colormap index. E.g. <CODE>boxcment 0</CODE>
reports the color of boxes created with no <CODE>-l</CODE> specified.
<P>
<DT><B>boxlabel [on|off]</B><DD><P>Label boxes by id number
(set by <CODE>-n</CODE> option of <CODE>box</CODE> data-command).
<P>
<DT><B>boxaxes [on|off]</B><DD><P>Toggle or set box axes display mode.
<P>
<DT><B>boxscale [float] [on|off] </B><DD><P>
<DT><B>gobox <I>boxnumber</I></B><DD><P>
<DT><B>goboxscale</B><DD><P>
<DT><B>menu fmenu</B><DD><P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
BEGIN CAVEMENU
pos P1 P2
wall P1
hid [P1]
show [P1]
h [P1]
demandfps [P1]
font
help
?
END CAVEMENU
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>
<DT><B>datascale</B><DD><P>
</DL>
<P>
<H2><A NAME="ss4.8">4.8 Data commands </A>
</H2>
<P>
<P>(see also partibrains.c::specks_read)
<P>Data Commands can be placed in a data file.
Lines starting with <CODE>#</CODE> will be skipped.
<P>Control Commands can also be given, if prefixed with the <CODE>eval</CODE> command.
<P>
<DL>
<P>
<DT><B>read <I>file</I> </B><DD><P>read a <CODE>speck</CODE> formatted file. Recursive, commands can nest. (strtok ok??)
Note that <CODE>read</CODE> is also a Control Command, doing exactly the same thing.
<P>
<DT><B>include <I>file</I></B><DD><P>read a <CODE>speck</CODE> formatted file.
<P>
<DT><B>ieee [-t time] <I>file</I></B><DD><P>read a IEEEIO formatted file, with optional timestep number (0 based).
Support for this type of data must be explicitly compiled into the program.
<P>
<DT><B>kira <I>file</I> </B><DD><P>read a <CODE>kira</CODE> formatted file. See the <CODE>kiractl</CODE> Control
Command to modify the looks of the objects.
<P>
<DT><B>setenv name value</B><DD><P>Add (or change) a named variable of the environment variables space of
partiview. Enviroment variables, like in the normal unix shell, can be
referred to by prepending their name with a $.
<I>Note there probably is not an unsetenv command</I>.
<P>
<DT><B>object <I>gN=ALIAS</I></B><DD><P>Defines/Selects a particular group number (N=1,2,3....) to an ALIAS. In
command mode you can use <CODE>gN=ALIAS</CODE>. Any data following this command
will now belong to this group.
<P>
<DT><B>object <I>ObjectName</I></B><DD><P>Select an existing group. Following data will now belong to this group.
<P>
<DT><B>sdbvars <I>var</I></B><DD><P>Choose which data fields to
extract from binary sdb files (any of: <CODE>mMcrogtxyzSn</CODE>) for subsequent
<CODE>sbd</CODE> commands.
<P>
<DT><B>sdb [-t time] <I>file</I></B><DD><P>Read an SDB (binary) formatted file, with optional timestep number (0 based).
<P>
<DT><B>box[es] <I>....</I></B><DD><P>Draw a box, using any of the following formats:
<P>
<DL>
<DT><B> <CODE>xmin ymin zmin xmax ymax zmax</CODE> </B><DD><P>
<DT><B> <CODE>xmin,xmax ymin,ymax zmin,zmax</CODE> </B><DD><P>
<DT><B> <CODE>xcen,ycen,zcen xrad,yrad,zrad</CODE> </B><DD><P>
<DT><B> <CODE>[-t time] [-n boxno] [-l level] xcen,ycen,zcen xrad,yrad,zrad </CODE> </B><DD><P>
</DL>
<CODE>level</CODE> determines color.
<P>
<DT><B><CODE>mesh</CODE> [<CODE>-t</CODE> <I>txno</I>] [<CODE>-c</CODE> <I>colorindex</I>] [<CODE>-s</CODE> <I>style</I>]</B><DD><P>Draw a quadrilateral mesh, optionally colored or textured.
Following the <B>mesh</B> line, provide a line with the mesh dimensions:
nu nv
<P>Following this comes the list of <I>nu</I>*<I>nv</I> mesh vertices,
one vertex (specified by several blank-separated numbers) per line.
(Blank lines and comments may be interspersed among them.)
Note that the mesh connections are implicit:
vertex number i*nu+j is adjacent to (i-1)*nu+j, (i+1)*nu+j, i*nu+(j-1),
and i*nu+(j+1). Each vertex line has three or five numbers:
the first three give its 3-D position, and if a <CODE>-t</CODE> texture was
specified, then two more fields give its u and v texture coordinates.
<P>
<P>Options:
<DL>
<DT><B> <CODE>-t</CODE> <I>txno</I> </B><DD><P>Apply texture number <I>txno</I> to surface.
In this case, each mesh vertex should also include
u and v texture coordinates.
<DT><B> <CODE>-c</CODE> <I>colorindex</I> </B><DD><P>Color surface with color from
integer cmap entry <I>colorindex</I>.
<DT><B> <CODE>-s</CODE> <I>style</I> </B><DD><P>Drawing style:
<DL>
<DT><B> <I>solid</I> </B><DD><P>filled polygonal surface (default)
<DT><B> <I>wire</I> </B><DD><P>just edges
<DT><B> <I>point</I> </B><DD><P>just points (one per mesh vertex)
</DL>
</DL>
<P>
<DT><B><I>Xcen Ycen Zcen</I> ellipsoid <I>[options]... [transformation]</I></B><DD><P>Draw an ellipsoid, specified by:
<DL>
<DT><B> <CODE>Xcen Ycen Zcen</CODE> </B><DD><P>Center position in world coordinates
<DT><B> <CODE>-c</CODE> <I>colorindex</I> </B><DD><P>Integer color index (default -1 => white)
<DT><B> <CODE>-s</CODE> <I>style</I> </B><DD><P>Drawing style:
<DL>
<DT><B> <I>solid</I> </B><DD><P>filled polygonal surface (default)
<DT><B> <I>plane</I> </B><DD><P>3 ellipses: XY, XZ, YZ planes
<DT><B> <I>wire</I> </B><DD><P>latitude/longitude ellipses
<DT><B> <I>point</I> </B><DD><P>point cloud: one per lat/lon intersection
</DL>
<DT><B> <CODE>-r</CODE> <I>Xradius</I>[,<I>Yradius</I>,<I>Zradius</I>] </B><DD><P>Radius (for sphere) or semimajor axes (for ellipsoid)
<DT><B> <CODE>-n</CODE> <I>nlat[,nlon]</I> </B><DD><P>Number of latitude and longitude divisions.
Relevant even for <I>plane</I> style, where they determine
how finely the polygonal curves approximate circles.
Default <I>nlon</I> = <I>nlat</I>/2 + 1.
<DT><B> <I>transformation</I> </B><DD><P>Sets the spatial orientation of the ellipsoid.
May take any of three forms:
<DL>
<DT><B> (nothing) </B><DD><P>If absent, the ellipsoid's
coordinate axes are the same as the world axes
for the group it belongs to.
<DT><B> 9 blank-separated numbers </B><DD><P>A 3x3 transformation matrix T from ellipsoid coordinates
to world coordinates, in the sense
Pworld = Pellipsoid * T + [Xcen, Ycen, Zcen].
<DT><B> 16 blank-separated numbers </B><DD><P>A 4x4 transformation matrix, as above but for the
obvious changes.
</DL>
</DL>
<P>
<DT><B>waveobj [-time <I>timestep</I>] [-static] [-texture <I>number</I>] [-c <I>colorindex</I>] [-s <I>style</I>] <I>file.obj</I></B><DD><P>Load a Wavefront-style .obj model. Material properties are
ignored; the surface is drawn in white unless <CODE>-c</CODE> <I>colorindex</I>
in which case it's drawn using that color-table color.
Also if <CODE>-texture</CODE> (alias <CODE>-tx</CODE>) is supplied,
the surface is textured using whatever texture coordinates are
supplied in the .obj file. The model is displayed at all times
only if marked <CODE>-static</CODE>; otherwise it's displayed only
at the time given by <CODE>-time</CODE> <I>timestep</I> or by the most recent <I>datatime</I>.
<P>
<P>
<P>
<P>
<DT><B>tfm [camera] <I>numbers...</I></B><DD><P>Object-to-world transformation.
May take 1, 6, 7, 9 or 16 numbers: either
<I>scalefactor</I> or
<I>tx ty tz rx ry rz </I>[it/scalefactor/]
or 16 numbers for 4x4 matrix,
or 9 numbers for 3x3 matrix.
See <I>Coordinates and Coordinate Transformations</I>.
<P>Normally the transform is to world coordinates;
but with optional <CODE>camera</CODE> prefix, the object's position
is specified relative to the camera, useful to place
legends in a fixed position on the screen.
In camera coordinates, (0,0,0) is the viewpoint,
x=y=0 at screen center, and negative z extends forward.
Try for example
<PRE>
tfm camera -3 -3 -20 0 0 0
0 0 0 text -size 20 Legend
</PRE>
<P>
<DT><B>eval <I>command</I></B><DD><P>execute a Control Command.
<P>
<DT><B>feed <I>command</I></B><DD><P>Synonym for <CODE>eval</CODE>.
<P>
<DT><B>VIRDIR <I>command</I></B><DD><P>Synonym for <CODE>eval</CODE>.
<P>
<P>
<DT><B>filepath <I>path</I></B><DD><P>A colon-separated list of directories in which datafiles, color maps, etc.
will be searched for. If preceded with the <CODE>+</CODE> symbol,
this list will be appended to the current <I>filepath</I>.
<P>
<DT><B>polyorivar <I>indexno</I></B><DD><P>By default, when polygons are drawn, they're parallel to the screen plane --
simple markers for the points. It's sometimes useful to give each
polygon a fixed 3-D orientation (as for disk galaxies). To do this,
provide 6 consecutive data fields, representing two 3-D orthogonal unit
vectors which span the plane of the disk. Then use
<CODE>polyorivar </CODE><I>indexno</I>
giving the data field number of the first of the 6 fields.
The vectors define the X and Y directions on the disk, respectively --
relevant if texturing is enabled.
<P>Actually, unit vectors aren't essential; making them different lengths
yields non-circular polygonal disks.
<P>If <CODE>polyorivar</CODE> is specified for the group, but some polygons should
still lie in the screen plane, use values <CODE>9 9 9 9 9 9</CODE> for those polygons.
<P>
<DT><B>texture [-aiAOlmnMDB] <I>txno file.sgi</I> </B><DD><P>
<DL>
<DT><B> -a(lpha) </B><DD><P>A single-channel image would normally be used as luminance data.
With <CODE>-a</CODE>, the image is taken as opacity data instead
(GL_ALPHA texture format).
<DT><B> -i(ntensity) </B><DD><P>For 1- or 3-channel images, compute the intensity of each pixel
and use it to form an alpha (opacity) channel.
<DT><B> -A(dd) </B><DD><P>Use additive blending. This texture will add to, not obscure,
the brightness of whatever lies behind it (i.e. whatever is drawn later).
<DT><B> -O(ver) </B><DD><P>Use "over" compositing. This texture will obscure features lying
behind it according to alpha values at each point.
<P>
<P>
<DT><B> -M(odulate) </B><DD><P>Multiply texture brightness/color values by the colormap-determined
color of each particle.
<DT><B> -D(ecal) </B><DD><P>The textured polygon's color is determined entirely by the texture,
suppressing any colormapped color.
<DT><B> -B(lend) </B><DD><P>Probably not very useful.
</DL>
<P>
<DT><B>texturevar <I>field</I></B><DD><P>If polygon-drawing and texturing are turned on, use the given
<I>field</I> (datavar name or number) in each particle to select
which texture (if any) to draw on its polygon.
<P>
<DT><B>coord <I>name ... 16 world-to-coord tfm floats (GL order)</I></B><DD><P>
<DT><B>dataset <I>indexno datasetname</I></B><DD><P>Give names to multiple datasets in IEEEIO files (read with <CODE>ieee</CODE> command).
<I>indexno</I> is an integer, 0 being the first dataset.
<P>
<DT><B>datavar <I>indexno name [minval maxval]</I></B><DD><P>Name the variable in data field <I>indexno</I>. The first data field has
<I>indexno</I> 0.
If provided, <I>minval maxval</I> supply the nominal range of that data variable;
some control commands (<CODE>lum</CODE>, <CODE>color</CODE>) need to know the range of data
values, and will use this instead of measuring the actual range.
<P>
<DT><B>datatime <I>time</I></B><DD><P>Label subsequent data with this <I>time</I> (a non-negative integer).
<P>
<DT><B><I>Xpos Ypos Zpos Var0 .... </I></B><DD><P>These lines, with XYZ positions in the first 3 columns, will make up the bulk
of a typical dataset. The 4th and subsequent columns contain the values of the
datavariables as named with the <B>datavar</B> commands. Note that
data variable (field) numbers are 0-based.
<P>
</DL>
<P>
<P>
<H2><A NAME="ss4.9">4.9 Kira/Starlab </A>
</H2>
<P>
<P>To read Kira output, in human-readable or binary <B>tdyn</B> form, use the
``<CODE>kira</CODE> <I>kirafilename</I>'' data-command.
<P>
<P>
<H3>Kira particle attributes </H3>
<P>The particles read in have the following attributes:
<DL>
<DT><B> id </B><DD><P>positive integer worldline index for single stars
(matching the id in the kira stream).
For non-leaf (center-of-mass) tree nodes, <CODE>id</CODE> is a
negative integer.
<DT><B> mass </B><DD><P>Mass, in solar mass units (see ``kira mscale'' control command).
<DT><B> nclump </B><DD><P>Number of stars in this particle's subtree.
1 for isolated stars, 2 for binaries, etc.
<DT><B> Tlog </B><DD><P>base-10 log of temperature (K)
<DT><B> Lum </B><DD><P>Luminosity in solar-mass units. (Note this is linear, not log luminosity.)
<DT><B> stype </B><DD><P>Stellar type code (small integer).
The [bracketed] message reported when picking (button-2 or p key)
on a star gives the corresponding human-readable stellar type too.
<DT><B> ismember </B><DD><P>Is this star still a member of (bound to) the cluster?
<DT><B> rootid </B><DD><P>id of root of subtree. For single stars, rootid = id.
<DT><B> treeaddr </B><DD><P>bit-encoded location of star in subtree.
<DT><B> ringsize </B><DD><P>0 for stars.
For nonleaf nodes, this is the semimajor axis or instantaneous
separation (according to ``<CODE>kira sep</CODE>'').
This field isn't multiplied by the scale factor given in
<CODE>kira sep</CODE>; it gives the actual distance in kira units.
<DT><B> sqrtmass </B><DD><P>Square root of mass/Msun. Might be useful for luminosity scaling.
<DT><B> mu </B><DD><P>Mass ratio for center-of-mass nodes. Zero for stars.
</DL>
<P>
<P>
<H3>Hertzsprung-Russell diagram </H3>
<P>The H-R diagram can be invoked via the <CODE>More...</CODE> menu (upper left)
or by the <CODE>kira hrdiag on</CODE> control command.
Axes for this plot are log temperature (initial range from 5 to 3)
and log luminosity (initial range -4 to 6). Ranges may be changed
with the <CODE>kira hrdiag range</CODE> command or with keystrokes.
<P>Keystroke commands in the H-R window:
<DL>
<DT><B> b/B </B><DD><P>Adjust the (b)rightness (dot size) of the dots plotted for each star.
Small b brightens (enlarges); capital B shrinks.
<DT><B> a/A </B><DD><P>Adjust (a)lpha (opacity) of dots plotted for each star.
If many stars coincide in H-R, their brightnesses add.
Thus reducing opacity may help clarify the relative L-T space
densities, if there are many stars.
<DT><B> v/V </B><DD><P>Zoom out (v) or in (V) by 33%. The point under the cursor
becomes the center of the view.
</DL>
<P>
<H3>kira control commands </H3>
<P>Viewing control options for kira/Starlab
formatted data that have been read in with
the <CODE>kira</CODE> Data Command.
All control commands begin with <CODE>kira</CODE> too.
<DL>
<DT><B> kira node {on|off|root} </B><DD><P>Show or hide center-of-mass nodes for multiple stars.
With <CODE>on</CODE>, show CM nodes for each level in a binary tree.
With <CODE>root</CODE>, show only the top-level CM node for each multiple.
<P>
<DT><B> kira ring {on|off|root} </B><DD><P>Show circles around multiple stars; <CODE>on</CODE> and <CODE>root</CODE> as above.
<P>
<DT><B> kira tree {on|off|cross|tick} [<I>tickscale</I>] </B><DD><P>Show lines connecting pairs of stars at each binary-tree level
in a multiple group. With <CODE>cross</CODE>, also show a perpendicular
line -- a tick mark -- which crosses at the CM point,
and whose length is <CODE>tickscale</CODE> (default 0.5) times the
true separation of the pair.
With <CODE>tick</CODE>, just show the tick-mark with no connecting line.
<P>
<DT><B> kira size [sep|semi] [<I>ringscalefactor</I>] </B><DD><P>Determines 3-D size of circles when <CODE>kira ring on</CODE>.
With <CODE>kira size sep</CODE>, ring diameter is scalefactor * instanteous
separation. With <CODE>kira size semi</CODE>, ring radius is scalefactor * a
(the semimajor axis of the two-body system, or <CODE>|a|</CODE> for
hyperbolic orbits). Using <CODE>semi</CODE> gives typically more stable-looking
rings, though they will pop if they become marginally (un-)bound.
Default: <CODE>kira size semi 1.5</CODE>.
<P>
<DT><B>kira scale <I>ringscalefactor</I></B><DD><P>Synonym for <CODE>kira size</CODE> above.
<P>
<DT><B> kira span <I>minpix</I> <I>maxpix</I> </B><DD><P>Sets screen-space (pixel) size limits on rings.
They'll never get smaller than radius <I>minpix</I> nor larger than
<I>maxpix</I>, regardless of true 3-D size. Thus even vanishingly
tight binaries can always be visibly marked.
Default: <CODE>kira span 2 50</CODE>.
<P>
<DT><B> kira track <I>id</I>|on|off </B><DD><P>As particle <I>id</I> moves through time, move the viewpoint in the
same way, so that (if you don't move the view by navigation)
the particle remains fixed in apparent position.
<CODE>kira track off</CODE> disables tracking, and <CODE>kira track on</CODE>
re-enables it.
Use the <CODE>p</CODE> key or mouse button 2 to pick a particle
(or CM node if <CODE>kira node on</CODE>) to see its numeric <I>id</I>.
Transient center-of-mass nodes (shown if <CODE>kira node on</CODE>)
can be tracked while they exist.
<P>
<DT><B> kira mscale <I>massscalefactor</I>[!] </B><DD><P>Set/check the mass scale factor.
Starlab dynamical mass values are multiplied by this factor
for reporting to the user. Normally <I>massscalefactor</I>
should equal the initial cluster mass in solar-mass units.
For some input files, starlab can determine what was specified
in the original kira run. If so, ``kira mscale <I>number</I>''
will be ignored unless <I>number</I> ends with an exclamation point (!).
So with no <CODE>!</CODE>, the user (or .cf script) provides a default value;
use <CODE>!</CODE> to override the original mass scale.
<P>
<DT><B> kira int <I>seldest</I> [= <I>selsrc</I>] </B><DD><P>Track interactions between particles.
As the cluster evolves, whenever any star matching
selection-expression <I>selsrc</I> encounters (is a member of
the same kira tree as) another particle, then the other
particle is added to the <I>seldest</I> set. If <I>seldest</I>
and <I>selsrc</I> are the same (or if ``= <I>selsrc</I>'' is omitted),
then <CODE>kira int</CODE> computes the transitive closure of the
interaction set.
Otherwise, only stars that encounter members of the initial
<I>selsrc</I> set become members of the <I>seldest</I> set.
Example:
<DL>
<DT><B> click on some star </B><DD><P>The clicked-on star(s) become members of the <CODE>pick</CODE> set.
<DT><B> sel x = pick </B><DD><P>Save a copy in the new set named <CODE>x</CODE>.
<DT><B> kira int x </B><DD><P>Accumulate encounters in the set <CODE>x</CODE>.
<DT><B> emph x </B><DD><P>Increase brightness of members of <CODE>x</CODE>.
<DT><B> kira trail x </B><DD><P>Extend trails from these set members.
</DL>
<P>
<P>
<DT><B> kira trail <I>selexpression</I>|off </B><DD><P>Leave trails behind particles selected by <I>selexpression</I>
(see the <CODE>sel</CODE> command). As (dynamical) time passes, for each
display update, one sample point is added to the trail
for each selected particle. (If you reverse the direction of
time, the trails will fold back on themselves.) Some examples:
<DL>
<DT><B> kira trail all </B><DD><P>Makes trails grow behind all particles
(including CM nodes, if they're displayed)
<DT><B> kira trail pick </B><DD><P>Clicking on a star will make a trail grow behind it.
If several stars are within picking range (under the cursor),
trails will grow behind each of them.
<DT><B> thresh -s big mass > 1.5 </B><DD><P>threshold when masses are larger than 1.5
<DT><B> kira trail big </B><DD><P>These two commands (a) select all stars exceeding
1.5 solar masses and (b) extend trails behind them.
</DL>
<P>
<DT><B> kira trail clear </B><DD><P>Erase current trails, but let them continue to accumulate
as time passes.
<P>
<DT><B> kira maxtrail <I>nsamples</I> </B><DD><P>Set how many time-points are kept for each particle's trail,
initially 50.
<P>
<DT><B> kira hrdiag on|off </B><DD><P>toggle to turn HD Diagram on or off. Initially off.
<DT><B> kira hrdiag range <I>logTleft logTright logLbottom logLtop</I> </B><DD><P>set limits on the HD Diagram axes.
<P>
</DL>
<P>
<P>
<H2><A NAME="ss4.10">4.10 Textures </A>
</H2>
<P>To make polygons be textured:
<UL>
<LI>Use a series of <CODE>texture</CODE> data-commands to provide a table
of textures, each named by a small integer <I>texture-index</I>;</LI>
<LI>Create a data field in each particle whose value is the
<I>texture-index</I> for that particle's polygon</LI>
<LI>Use data-command <CODE>texturevar </CODE><I>fieldno</I> to specify which
data field that is.</LI>
<LI>Use control commands (<CODE>poly</CODE>, <CODE>polylumvar</CODE>, <CODE>polysize</CODE>)
to enable drawing polygons and textures,
and to give the polygons nonzero size.</LI>
<LI>Possibly use control command <CODE>polysides</CODE> to specify
4-sided polygons -- a bit faster to draw than default 11-gons.</LI>
</UL>
It doesn't matter whether the texture-index data field is given a datavar name.
<P>For each particle, if the value of its <I>texturevar</I>'th field either
(a) doesn't match the value in some <CODE>texture</CODE> command or
(b) the file named in that <CODE>texture</CODE> command couldn't be read,
then its polygon is drawn as if texturing were disabled.
<P>
<H2><A NAME="ss4.11">4.11 Coordinates and Coordinate Transformations</A>
</H2>
<P>Matrices as for the <B>tfm</B> command
are intended to be multiplied by an
object-coordinate row vector on the left,
so that 4x4 matrices specify a translation
in their 13th through 15th entries. Generally they're
in the sense of an object-or-camera-to-world transform.
<P>The six- or seven-number transforms (<I>tx ty tz rx ry rz </I>[it/scalefactor/],
as accepted by the <B>tfm</B> and <B>jump</B> commands)
are interpreted as
<P><I>Pworld = Pobject * scalefactor * </I>rotY(<I>ry</I>) * rotX(<I>rx</I>) * rotZ(<I>rz</I>) * translate(<I>tx,ty,tz</I>)
<P>
<H2><A NAME="ss4.12">4.12 Colormap Files</A>
</H2>
<P>Colormap files, as read by the <CODE>cmap</CODE> and <CODE>vcmap</CODE> commands,
are line-oriented text files. Blank lines are ignored, as are
<CODE>#</CODE> comments. The first nonblank, non-comment line gives
the colormap <I>size</I> (number of entries). Later lines may have the form
<PRE>
<it/R G B/
</PRE>
giving red, green, and blue, each in the range 0 .. 1.
Typically there will be <I>size</I> of these lines. However the
colormap need not be written sequentially; a line like
<PRE>
<it/colorindex/: <it/R G B/
</PRE>
places that RGB value at that <I>colorindex</I>, in the range 0 .. <I>size</I>-1.
Later <I>R G B</I> lines are assigned to <I>colorindex+1</I>, <I>colorindex+2</I>
and so on. Also,
<PRE>
<it/colorindex/ := <it/oldcolorindex/
</PRE>
copies the (previously-assigned) RGB value from <I>oldcolorindex</I>
and assigns it to <I>colorindex</I>.
<P>
<HR>
<A HREF="partiview-5.html">Next</A>
<A HREF="partiview-3.html">Previous</A>
<A HREF="partiview.html#toc4">Contents</A>
</BODY>
</HTML>