Skip to content
Snippets Groups Projects
partiview.sgml 57.2 KiB
Newer Older
teuben's avatar
teuben committed
<!doctype linuxdoc system>

<!-- 
     Changelog:
     2000-09-25   created the changelog after a week of initial editing    PJT
     2000-10-10   made consistent with VERSION 0.1 release                 PJT
teuben's avatar
teuben committed
     2000-11-07   election night changes                                   PJT
teuben's avatar
teuben committed
     2000-11-20   document some CVS and new configure stuff for 0.3        PJT
     2000-12-28   document new movie features for the new CVS version      
                  and lotsa more commands described now                    PJT
teuben's avatar
teuben committed
 -->

<article>

<!-- Title information -->

<title> Partiview (PC-VirDir)
<author> Peter Teuben, Stuart Levy
teuben's avatar
teuben committed
<abstract>
This document helps you installing and running the development version 
teuben's avatar
teuben committed
of partiview.
Quite a few things in this manual have not been fleshed
teuben's avatar
teuben committed
out, in particular the detailed description of all the commands.
</abstract>

<!-- Table of contents -->
<toc>

<!-- Begin the document -->

<!--------------------------------------------------------------------------- -->

teuben's avatar
teuben committed
<sect> Installation
<p>

This assumes you have the July 2001 release (version 0.6 or later) of 
teuben's avatar
teuben committed
<bf/partiview/, not the earlier "<bf/gview/" release that was described
teuben's avatar
teuben committed
in earlier versions of this document. We keep copies of some support
files (Mesa, FLTK) on our initial
teuben's avatar
teuben committed
<htmlurl url="http://www.astro.umd.edu/nemo/amnh"
        name="http://www.astro.umd.edu/nemo/amnh"> website. Note that
this current development release is only documented for work under Linux,
although we expect it to work for at least SGI and maybe Solaris too.

teuben's avatar
teuben committed
<sect1> MESA/OpenGL
<p>
    First make sure <tt/Mesa/ is installed, for <tt/redhat6.2/
       there are rpm files
       available.  Check if you have the following:

<tscreen><code>
       % rpm -qa | grep Mesa
       Mesa-3.2-2
       Mesa-devel-3.2-2
       % rpm -i Mesa-3.2-2.i686.rpm Mesa-devel-3.2-2.i686.rpm
teuben's avatar
teuben committed
</code></tscreen>

       You should have both installed. Some packages will use <tt/libMesaGL/, others
       <tt/libGL/. The <tt/configure/ script (see below) 
       should take care of the two possible options.
teuben's avatar
teuben committed
<p>
	Homepage: <htmlurl url="http://mesa3d.sourceforge.org"
			  name="http://mesa3d.sourceforge.org">
<p>
	Redhat packages: (part of powertools I believe)
teuben's avatar
teuben committed

<sect1> FLTK
<p>
    Also make sure <tt/fltk/ is installed.  If you got my version, do this (as
       root)

teuben's avatar
teuben committed
<tscreen><code>
       % locate libfltk.a 
       % locate Fl_Slider.h

teuben's avatar
teuben committed
       % cd <where-ever>/fltk-1.0.9
       % make install
teuben's avatar
teuben committed
</code></tscreen>

       (you only need it if you want to recompile the program at some point,
        not if you just want to run it)
<p>
	Homepage: <htmlurl url="http://www.fltk.org/"
			   name="http://www.fltk.org/">
<p>
	Redhat packages: <htmlurl url="http://www.cs.cornell.edu/nogin/RPM/fltk-devel.html"
			       name="http://www.cs.cornell.edu/nogin/RPM/fltk-devel.html">

<sect1> partiview
<p>

Extract the tarball, and install the program from within the 
<tt/src/ directory:
teuben's avatar
teuben committed

<tscreen><code>
       % tar zxf partiview-0.6.tar.gz
teuben's avatar
teuben committed

teuben's avatar
teuben committed
       % make clean                (if you really must compile a new executable)
teuben's avatar
teuben committed
       % ./configure               (GNU autoconf toolset to ease installation)
       % make depend               (might need to make new local dependancies)
       % make partiview	           (should not have to edit Makefile anymore)
teuben's avatar
teuben committed
</code></tscreen>

teuben's avatar
teuben committed
<sect1> CVS
<p>
<tt/partiview-0.5/ is under CVS control, and occasionally we
will stamp out a new release when we deem it stable. Anonymous CVS may also
be offered, but this is not currently enabled. Currently the 
CVS repository machine is
<tt/akash.astro.umd.edu/ and you will need to setup your developers account with
teuben's avatar
teuben committed
Peter (<tt/teuben@astro.umd.edu/). Here's a sample session with some commonly
used CVS commands:

<tscreen><code>
 setenv CVSROOT   :pserver:pteuben@akash.astro.umd.edu:/home/cvsroot
teuben's avatar
teuben committed
 setenv CVSEDITOR emacs
 setenv CVS_RSH   ssh           (not needed for pserver access though)
teuben's avatar
teuben committed

 cvs login                      (only needed once, and only for pserver type access)

teuben's avatar
teuben committed
 mkdir ~/cvsstuff
 cd ~/cvsstuff
 cvs checkout partiview              # get a new local sandbox to work in, or
teuben's avatar
teuben committed
 cvs -n -q update partiview          # check if others had made any changes
 cvs update partiview                # if so, update your sandbox and/or resolve conflicts
teuben's avatar
teuben committed
 cd partiview/src
 ./configure
 emacs partibrains.c                 # edit some files
teuben's avatar
teuben committed
 make all                            # compile the program
 ./partiview                         # test the program
 emacs kira_parti.cc                 # edit another file
teuben's avatar
teuben committed
 make all                            # check if it still compiles
teuben's avatar
teuben committed
 cvs -n -q update                    # check if anybody else made changes
 cvs update                          # if so, update your sandbox again, resolve conflicts

teuben's avatar
teuben committed
 cvs commit                          # and commit your changes
 cd ../..

 cvs release partiview               # if you want to release and remove this sandbox
teuben's avatar
teuben committed

</code></tscreen>
teuben's avatar
teuben committed

<!--------------------------------------------------------------------------- -->
teuben's avatar
teuben committed
<sect> Directory structure
<p>

Here is the directory structure, as per version 0.1:
teuben's avatar
teuben committed

<p>
<tscreen><verb>
     partiview/             root directory
     partiview/src          source code
     partiview/data         sample datafiles (e.g. Hipparcos Bright Star Catalogue)
teuben's avatar
teuben committed
     partiview/doc          manual (sgml, and derived  html, txt, ps/dvi)
     partiview/nemo         NEMO specific converters/code
     partiview/starlab      STARLAB specific converters/code
teuben's avatar
teuben committed
     partiview/tutor        examples of tutorial type code (added in 0.2)
teuben's avatar
teuben committed
     partiview/windows      windows executables/support (old)
     
</verb></tscreen>

<sect> Running the program
teuben's avatar
teuben committed
<p>
First we describe a simple example how to run <tt/partiview/ with a supplied sample
dataset. Then we describe the different windows that <tt/partiview/ is made up of, and
the different commands and keystrokes it listens to.
teuben's avatar
teuben committed

<sect1>  Example 1: Hipparcos Bright Star Catalogue 3-D viewing
teuben's avatar
teuben committed
<p>

Start the program using one of the sample  "speck" files in the
teuben's avatar
teuben committed
<tt/data/ directory:

<tscreen><code>
teuben's avatar
teuben committed
       % ./hipbright
teuben's avatar
teuben committed
       % partiview hipbright
teuben's avatar
teuben committed
</code></tscreen>

teuben's avatar
teuben committed
and this should come up with a display familiar to most of us who
watch the skies. You should probably enlarge the
teuben's avatar
teuben committed
window a bit. Mine comes up in roughly a 300 by 300 display window,
which may be a bit small (certainly on my screen :-)
(Hint: the <tt/.partiviewrc/ file may contain commands like
<tt/eval winsize 600 400/.)
teuben's avatar
teuben committed


Hit the TAB key to bring focus to the (one line) command window inbetween
teuben's avatar
teuben committed
the log screen (top) and viewing screen (bottom). Type the commands

<tscreen><code>
	fov 50				(field of view 50 degrees)
	jump 0 0 0 80 70 60		(put yourself in the origin
					and look at euler angles
teuben's avatar
teuben committed
					RxRyRz (80,70,60)
teuben's avatar
teuben committed

</code></tscreen>

teuben's avatar
teuben committed
and it should give another nice comfy view :-)  If you ever get lost, use
the <tt/jump/ command to go back to a known position and/or viewing
teuben's avatar
teuben committed
angle.
teuben's avatar
teuben committed

<figure loc="tbp">
<img src="pv1.gif">
<caption>partiview view</caption>
</figure>

<p>
teuben's avatar
teuben committed
[spatial units are parsecs, angle units are degrees]
teuben's avatar
teuben committed
<p>
teuben's avatar
teuben committed
Now play with the display, use the 't', 'r', 'f' and 'o' keys in the viewing
window and use the
teuben's avatar
teuben committed
left and mouse buttons down to (carefully) move around a bit, and make
yourself comfortable with moving around. Using the 't' button you get
some idea of the distance of the stars by moving back and forth a little
(the parallax trick). In fact, if you 't' around a little bit, you may
see a green line flashing through the display. This is one of the  RGB
teuben's avatar
teuben committed
(xyz) axes attached to the (0,0,0) [our sun] position.  You should see
teuben's avatar
teuben committed
Procyon and Sirius exhibit pretty large parallaxes, but Orion is pretty
teuben's avatar
teuben committed
steady since it is several hundred parsecs away.
If you move the right mouse button you will zoom in/out and 
teuben's avatar
teuben committed
should see our Sun flash by with the red-green-blue axes.
<p>
slevy's avatar
slevy committed
The RGB axes represent the XYZ axes in a cartesian system. For the Hipparcos
data the X (red) axis points to RA=0h, Y (green) axis to RA=6h, both in the equatorial
plane, and the Z (blue) axis points to the equatorial north pole.
teuben's avatar
teuben committed
Try and use the middle mouse button (or the 'p' key)  to click on Sirius
or Procyon, and see if you can get it to view its properties.  Now use
the 'P' key to switch center to rotation to that star. Sirius is
probably a good choice. Move around a bit, and try and get the sun and orion
in the same view :-)
<p>
[NOTE: these Hipparcos data do not have reliably distance above
100-200 pc, so Orion's distances are probably uncertain to 30%]
<p>

A little bit on the types of motion, and what the mouse buttons do

<tscreen><code>

              |     left            middle          right
              |     Button-1        Button-2        Button-3         Shift Button-1
------------------------------------------------------------------------------------
teuben's avatar
teuben committed
f (fly)       |     fly             'pick'          zoom
o (orbit)     |     orbit           'pick'          zoom
r (rotate)    |     rotate X/Y      'pick'          rotate Z (+bug?)    translate
teuben's avatar
teuben committed
t (translate) |     translate       'pick'          zoom

</code></tscreen>

The point of origin for rotations can be changed with the 'P' button.
First you can try and pick ('p' or Button-2) a point, and if found,
teuben's avatar
teuben committed
hit 'P' to make this point the new rotation center default.



<tscreen><code>
red   = X axis
green = Y axis
blue  = Z axis
</code></tscreen>

<sect1> Top Row
<p>
The top row, from left to right, shows the following buttons:
<p>
<descrip>

<tag> More </tag>
Offers some mode switches: <tt/inertia/ (not yet implemented)
and a button to invoke an H-R diagram window.
teuben's avatar
teuben committed

<tag> [g1] </tag>
Pulldown g1, g2, ... (or whichever group) 
is the currently selected group. See  <tt/object/ command
to make aliases which group is defined to what object. If multiple
groups are defined, the next row below this contains a list of all
the groups, and their aliases, so you can toggle them to be displayed.
teuben's avatar
teuben committed

<tag> [f]ly </tag>
Pulldown to select fly/orbit/rot/tran, which can also be activate
teuben's avatar
teuben committed
by pressing the f/o/r/t keys inside the viewing window.

<tag> point </tag>
Toggle to turn the points on/off. See also the <tt/points/ command.
teuben's avatar
teuben committed

<tag> poly </tag>
Toggle to turn polygons on/off. See also the <tt/polygon/ command.
teuben's avatar
teuben committed

<tag> lbl </tag>
Toggle to turn labels on/off. See also the <tt/label/ command.
teuben's avatar
teuben committed

<tag> tex </tag>
Toggle to turn textures on/off. See also the <tt/texture/ command.
teuben's avatar
teuben committed

<tag> box </tag>
Toggle to turn boxes on/off. See also the <tt/boxes/ command.
teuben's avatar
teuben committed

<tag> #.### </tag>
The current displayed value of <tt/logslum lum/ (see below)

teuben's avatar
teuben committed
<tag> logslum lum </tag>
Slider controlling a <bf/datavar/ variable (the one selected as
luminosity)

</descrip>

<sect1> Group row (optional)
<p>
When more than one group has been activated (groups of particles or objects 
can have their own display properties, and be turned on and off at will),
a new Group Row will appear as the 2nd row.
<p>
Left-clicking (button 1) on a button toggles the display of that group;
right-clicking (button 3) enables display of the group,
and also selects it as the current group for GUI controls and
text commands.

<sect1> Time Animation rows (Optional)


For time-dependent data, the third and fourth row from
the top control the currently displayed data-time.
This time-control bar is only visible when the object
has a nonzero time range.
Shows the current time (or offset from the tripmeter).
The absolute time is the sum of the <bf/T/ and <bf/+/ fields.
Both are editable.
See also the <tt/step/ control command.
Press to mark a reference point in time.
The T field becomes zero, and the + field (below)
is set to current time.  As time passes, T shows the
offset from this reference time.
Press to return to reference time (sets T to 0).
<tag> + </tag>
Current last time where tripmeter was set. You can reset to
the first frame with the command <tt/step 0/

Drag to adjust the current time.  Sensitivity depends
on the speed setting; dragging by one dial-width
corresponds to 0.1 wall-clock second of animation,
i.e. 0.1 * <it/speed/ in data time units.
Step time backwards or forwards by 0.1 * <it/speed/ data time units.
See also the <tt/</ and <tt/>/ keyboard shortcuts.
<tag> >> </tag>  toggle movie move forwards in time
Toggle animating backwards or forwards in time, by 
1 * <it/speed/ data time units per real-time second.
See also the <tt/{/, <tt/~/, and <tt/}/ keyboard shortcuts.
(Logarithmic) value denoting <it/speed/ of animation.
See also the <tt/speed/ control command.
teuben's avatar
teuben committed

</descrip>


<sect1> Camera (path) Animation row
teuben's avatar
teuben committed
<p>
The fifth (or 4th or 3rd, depending if Group and/or Time rows are present)
row from the top controls loading and playing sequences of moving through space.
teuben's avatar
teuben committed
<p>
<descrip>

<tag> Load... </tag>
Brings up a filebrowser to load a <bf/.wf/ path file. This is a file with on each
line 7 numbers: xyz location, RxRyRz viewing direction, and FOV (field of view).
The <tt/rdata/ command loads such path files too.
teuben's avatar
teuben committed

<tag> Play </tag>
Play the viewpoint along the currently loaded path,
as the <tt/play/ command does.
Right-click for a menu of play-speed options.
teuben's avatar
teuben committed

<tag> << < [###] >>> </tag>
Step through camera-path frames.
See also <tt/frame/ control command.
teuben's avatar
teuben committed

<tag> slider </tag>
Slides through camera path, and displays current frame.
teuben's avatar
teuben committed

</descrip>

teuben's avatar
teuben committed
<sect1> Logfile window
teuben's avatar
teuben committed
<p>
The third window from the top contains a logfile of past commands
and responses to them, and can be resized by dragging the bar between
command window and viewing window.
The Logfile window also has a scroll bar on the left. You can
direct the mouse to any previous command, and it will show up in the
command window. Using the arrow keys this command can then be edited.
teuben's avatar
teuben committed
<p>

teuben's avatar
teuben committed
<sect1> Command window
<p>
The Command window is a single line entry window, in which Control
Commands can be given.  Their responses appear in the Logfile
window and on the originating console.  (unlike Data Commands,
which show no feedback).
The Up- and Down-arrow keys (not those on the keypad) scroll through
previous commands, and can be edited using the arrow keys and a subset
of the emacs control characters.
teuben's avatar
teuben committed
<p>
teuben's avatar
teuben committed

teuben's avatar
teuben committed
<sect1> Viewing window
<p>
The (OpenGL) Viewing window is where all the action occurs.  Typically
this is where you give single keystroke commands and/or move the mouse
for an interactive view of the data.  It can be resized two ways:
either by resizing the master window, or by picking up the separator
between Viewing window and Command window above.
teuben's avatar
teuben committed

<sect1> Example 2: a (starlab) animation
<p>
Setting up a small animation in for example Starlab can be done quite simply as follows:

<tscreen><code>
  mkplummer -i -n 20 | mkmass -l 0.5 -u 10.0 | scale -s | kira -d 2 -D x10 > run1
     (lots of output from kira will still appear on the screen)
  partiview run1.cf
  cat run1.cf

     kira run1
     eval every
     eval lum mass 0 0.01
     eval psize 100
     eval cment 1   1 .7 .3
     eval color clump exact
       
</code></tscreen>

Alternatively, if you had started up partiview without any arguments, the following
Control Command (see below) would have done the same

<tscreen><code>
     read run1.cf
</code></tscreen>
teuben's avatar
teuben committed

<sect1> Example 3: stereo viewing 
<p>
The 's' key within the viewing window toggles stereo viewing. By default each
object is split in a blue and a red part, that should be viewed with a pair
of red(left)/blue(right) glasses. Red/green glasses will probably work too.
See <bf/stereo/ and <bf/focallen/ in the View Commands section. 

<!--
  -->

<p>
<p>
There are two types of commands in <tt/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 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 <tt/add/ command prefix.  (Likewise, a control command
may be given where data is expected, using the <tt/eval/ prefix.)

<!-- 
	Before we explain the two types of Commands in
	more detail, a few other concepts are needed:
-->
teuben's avatar
teuben committed
<p>

(see partibrains.c::specks_parse_args)
<p>
Control Commands are accepted in the Command window, and in some other contexts.
Generally, <tt/partiview/ gives a response to every Control Command,
reporting the (possibly changed) status.
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 <tt/add/.
teuben's avatar
teuben committed


teuben's avatar
teuben committed

teuben's avatar
teuben committed
<tag>
teuben's avatar
teuben committed
</tag>
Read a file containing Data Commands (typical suffix <tt/.cf/ or <tt/.speck/).
teuben's avatar
teuben committed

NOTYET (would read a file containing control commands)
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
slevy's avatar
slevy committed
Run an arbitrary unix command (invoked via /bin/sh) as a subprocess of <tt/partiview/.
Its standard output is interpreted as a stream of control commands.
Thus <tt/partiview/ can be driven externally, e.g. to record an animation
(using the <tt/snapshot/ command), or to provide additional GUI controls.
Several <tt/async/ commands can run concurrently.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Enter a Data Command where a Control Command is expected,
e.g. in the text input box.  For example,
<verb>
  add 10 15 -1 text blah
</verb>
adds a new label "blah" at 10 15 -1, or
<verb>
  add kira myrun.out
</verb>
loads a starlab output file.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Processes that control command just as if the <tt/eval/ prefix weren't there.
Provided for symmetry: wherever either a control command or a data command
is expected, entering <tt/eval/ <it/control-command/ ensures that it's
taken as a control command.
teuben's avatar
teuben committed


<tag>
add filepath (data-command)
teuben's avatar
teuben committed
</tag>
Determines the list of directories where all data files, color maps, etc.
are sought.  See the <tt/filepath/ entry under
<!-- ref id="datacommands" name="Data Commands" --> Data Commands.
teuben's avatar
teuben committed

teuben's avatar
teuben committed

<sect1>Object group commands
<p>
<tt/Partiview/ 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
slevy's avatar
slevy committed
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 <it/currently selected/ group.
Groups always have names of the form g<it/N/ for some small positive <it/N/;
each group may also have an alias.
teuben's avatar
teuben committed

teuben's avatar
teuben committed
<tag>
g<it/N/ </tag>
Select group g<it/N/.  Create a new group if it doesn't already exist.
teuben's avatar
teuben committed

<tag>
g<it/N/=<it/alias/ </tag>
Assign name <it/alias/ to group g<it/N/.
Note no blanks around the <tt/=/ sign.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Likewise, select object <it/objectname/, which may be either an alias name
slevy's avatar
slevy committed
or g<it/N/.  
teuben's avatar
teuben committed

<tag>
g<it/N/ <it/control-command/
teuben's avatar
teuben committed
</tag>

<tag>
object <it/objectname/ <it/control-command/
teuben's avatar
teuben committed
</tag>
Either form may be used as a <it/prefix/ to any control command
to act on the specified group, e.g. <tt/object fred poly on/
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Invoke the given <it/control-command/ in all groups.
For example, to turn display of group 3 on and all others off, use:
<tscreen><verb>
gall off
g3 on
</verb></tscreen>
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>

<tag>
teuben's avatar
teuben committed
</tag>
Enable display of currently selected group (as it is by default).
teuben's avatar
teuben committed

Turn off display of current group.
teuben's avatar
teuben committed
<p>
View commands affect the view; they aren't specific to data groups.
teuben's avatar
teuben committed

teuben's avatar
teuben committed
<tag>
teuben's avatar
teuben committed
</tag>
Angular field of view (in degrees) in Y-direction.
teuben's avatar
teuben committed

<tag>
cen[ter] <it/X Y Z/ [<it/RADIUS/]
teuben's avatar
teuben committed
</tag>
<!-- int[erest] <it/X Y Z/ [<it/RADIUS/] -->
Set point of interest.  This is the center of rotation in
<tt/[o]rbit/ and <tt/[r]otate/ modes.  Also, in <tt/[o]rbit/ mode,
translation speed is proportional to the viewer's distance from this point.
The optional <it/RADIUS/ (also set by <tt/censize/) determines the size
of the marker crosshair, initially 1 unit.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Set size of point-of-interest marker.
<p>
teuben's avatar
teuben committed


<tag>
teuben's avatar
teuben committed
</tag>
Report the 3-D camera position and forward direction vector.
teuben's avatar
teuben committed

<tag>
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 <it/FAR//<it/NEAR/ ratio exceeds 10000 or so.
teuben's avatar
teuben committed

To set the far clip range without changing the near, use a non-numeric
near clip value, e.g. <tt/clip - 1000/.

<!--
teuben's avatar
teuben committed
<tag>
ortho
</tag>
teuben's avatar
teuben committed
NOTYET
teuben's avatar
teuben committed

<tag>
jump [<it/X Y Z/] [<it/Rx Ry Rz/]
teuben's avatar
teuben committed
</tag>
Get or set the current position (XYZ) and/or viewing (RxRyRz) angle.

teuben's avatar
teuben committed
<tag>
readpath
</tag>
Read a Wavefront (<tt/.wf/) file describing a path through space.
teuben's avatar
teuben committed

<tag>
rdata
teuben's avatar
teuben committed
</tag>
Synonym for readpath.
teuben's avatar
teuben committed

<tag>
play <it/speed/[f]
teuben's avatar
teuben committed
</tag>
Play the currently loaded (from <tt/readpath//<tt/rdata/) camera animation
path, at <it/speed/ 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 <it/speed/-th frame, without regard to real
time.
teuben's avatar
teuben committed

<tag>
frame [<it/frameno/]
teuben's avatar
teuben committed
</tag>
Get or set the current frame the <it/frameno/-th.
<tag>


<tag>
update		
</tag>
Ensures the display is updated, as before taking a snapshot.
Probably only useful in a stream of control commands from an <tt/async/
subprocess.

<tag>
winsize [<it/XSIZE/ [<it/YSIZE/]]
</tag>
Resize graphics window.  With no arguments, reports current size.
With one argument, resizes to given width, preserving aspect ratio.

<tag>
bgcolor <it/R G B/
</tag>
Set window background color (three R G B numbers or one grayscale value).
teuben's avatar
teuben committed

<tag>
cen[ter] [<it/X Y Z/ [<it/RADIUS/]]
int[erest] [<it/X Y Z/ [<it/RADIUS/]]
teuben's avatar
teuben committed
</tag>
Set point of interest.  This is the center of rotation in
<tt/[o]rbit/ and <tt/[r]otate/ modes.  And, in <tt/[o]rbit/ mode,
translation speed is proportional to the viewer's distance from this point.
The optional <it/RADIUS/ (also set by <tt/censize/) determines the size
of the marker crosshair, initially 1 unit.
teuben's avatar
teuben committed

<tag>
censize [<it/RADIUS/]
teuben's avatar
teuben committed
</tag>
Set size of point-of-interest marker.
teuben's avatar
teuben committed
<p>

teuben's avatar
teuben committed
<tag>
teuben's avatar
teuben committed
</tag>
Focal length: distance from viewer to a typical object of interest.
This affects stereo display (see below) and navigation: the speed of
motion in <tt/[t]ranslate/ and <tt/[f]ly/ modes is proportional to this
distance.
teuben's avatar
teuben committed

<tag>
stereo [on|off|redcyan|glasses] [<it/separation/]
teuben's avatar
teuben committed
</tag>
Stereo display.  Also toggled on/off by typing <tt/'s'/ key in graphics window.
Where hardware allows it, <tt/stereo glasses/ selects
CrystalEyes-style stereo.  All systems should be capable of
<tt/stereo redcyan/, which requires wearing red/green or red/blue glasses.
Useful <it/separation/ values might be 0.02 to 0.1, or -0.02 to -0.1 to swap
eyes.  See also <tt/focallen/ 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.
teuben's avatar
teuben committed

snapset [<tt/-n/ <it/FRAMENO/] <it/FILESTEM/ [<it/FRAMENO/]
</tag>
Set parameters for future <tt/snapshot/ commands.
<it/FILESTEM/ may be a printf format string with frame number as
argument, e.g. <tt>snapset pix/%04d.ppm</tt>, generating image names
of <tt>pix/0000.ppm</tt>, <tt>pix/0001.ppm</tt>, etc.
If <it/FILESTEM/ contains no % sign, then <tt/.%03d.ppm.gz/ is
appended to it, so <tt>snapset ./pix/fred</tt>
yields snapshot images named <tt>./pix/fred.000.ppm.gz</tt> etc.
<p>
Frame number <it/FRAMENO/ (default 0) increments with each snapshot taken.
<p>
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Capture a snapshot image of the current view.
Use <tt/snapset/ to specify the output image name.
Default format is <tt/snap.%03d.tif/.

<tt/Partiview/ generally invokes the ImageMagick program <tt/convert(1)/,
which must be installed and be on the user's $PATH.  <tt/Convert/ determines
the type of image (jpeg, sgi, bmp, etc.) based on the file suffix.
teuben's avatar
teuben committed

<tt/Convert/ is not needed if the <tt/snapset/ <it/FILESTEM/ ends in
<tt/.ppm.gz/ (invokes gzip rather than convert) or <tt/.ppm/
(no external program required).

</descrip>


<sect1>Particle Display Commands
<p>
These commands affect how particles (in the current group) are
displayed.

<descrip>
teuben's avatar
teuben committed
<tag>
psize <it/scalefactor/
</tag>
All particle luminosities (as specified by <tt/lum/ command)
are scaled by the product of two factors:
a <it/lumvar/-specific factor given by <tt/slum/,
and a global factor given by <tt/psize/.
So the intrinsic brightness of a particle is
<it/value-specified-by-/<tt/lum/
* <it/slum-for-current-lumvar/
* <it/psize-scalefactor/.

<tag>
slum <it/slumfactor/
</tag>
Data-field specific luminosity scale factor, for current choice of
<it/lumvar/ as given by the <tt/lum/ command.
A <it/slumfactor/ is recorded independently for each data field, so
if data fields <tt/mass/ and <tt/energy/ were defined, one might say
<tscreen><verb>
lum mass
slum 1000
lum energy
slum 0.25
</verb></tscreen>
having chosen each variable's <it/slumfactor/ for useful display,
and then freely switch between <tt/lum mass/ and <tt/lum energy/
without having to readjust particle brightness each time.

<!--  Just describe "slum"
<tag>
scale-lum
</tag>
 -->

<tag>
ptsize <it/minpixels/ <it/maxpixels/
</tag>
Specifies the range of <it/apparent/ sizes of points,
in pixels.  Typical values might be <tt/ptsize 0.1 5/.
The graphics system may silently impose an upper limit
of about 10 pixels.

<!-- DEPRECATED COMMAND
<tag>
pointsize 
</tag>
-->

<tag>
polysize [on|off] [a|s|r]
</tag>

<tag>
polylum
</tag>

<tag>
polyminpixels
teuben's avatar
teuben committed
</tag>
<tag>
polymin <it/minradius/ [<it/maxradius/]
</tag>
teuben's avatar
teuben committed

<tag>
color
</tag>
   Specify how particles are colored.
   Generally, a linear function of some data field of each particle
   becomes an index into a colormap (see <tt/cmap/, <tt/cment/).
    <descrip>
    <tag> color  <it/colorvar/  [<it/minval maxval/] </tag>
	Use data field <it/colorvar/ (either a name as set by <tt/datavar/
	or a 0-based integer column number) to determine color.
	Map <it/minval/ to color index 1, and <it/maxval/ to
	the next-to-last entry in the colormap (<it/Ncmap-2/).
	The 0th and last (<it/Ncmap-1/) colormap entry are used for
	out-of-range data values.

	If <it/minval/ and <it/maxval/ are omitted, the actual range of
	values is used.
	
    <tag> color  <it/colorvar/  exact  [<it/baseval/] </tag>
	Don't consider field <it/colorvar/ as a continuous variable;
	instead, it's integer-valued, and mapped one-to-one with
	color table slots.  Data value <it/N/ is mapped to
	color index <it/N+baseval/.

    <tag> color  <it/colorvar/  -exact </tag>
	Once the <tt/exact/ tag is set (for a particular data-field),
	it's sticky.  To interpret that data field as a continuous, scalable
	variable again, use <tt/-exact/.
	
    <tag> color  const  <it/R G B/ </tag>
	Show all particles as color <it/R G B/, each value in range 0 to 1,
	independent of any data fields.
    </descrip>
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
   Specify how particles' intrinsic luminosity is computed:
   a linear function of some data field of each particle.
   <descrip>
   <tag> lum <it/lumvar/  [<it/minval maxval/] </tag>
	Map values of data field <it/lumvar/ (<tt/datavar/ name or
	field number) to luminosity.
	The (linear) mapping takes field value <it/minval/ to
	luminosity 0 and <it/maxval/ to luminosity 1.0.
	<p>
	If <it/minval/ and <it/maxval/ 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 <tt/psize/ and <tt/slum/ scale factors, and further
	scaled according to distance as specified by <tt/fade/, to compute
	apparent brightness of points.

   <tag> lum const <it/L/ </tag>
	Specify constant particle luminosity <it/L/ independent of
	any data field values.
   </descrip>
teuben's avatar
teuben committed

<tag>
fade [planar|spherical|linear <it/refdist/|const <it/refdist/]
</tag>
Determines how distance affects particles' apparent brightness (or "size").
The default <tt/fade planar/ gives 1/r^2 light falloff, with r measured
as distance from the view plane.  <tt/fade spherical/ is also 1/r^2,
but with r measured as true distance from the viewpoint.
<tt/fade linear/ <it/refdist/ gives 1/r light falloff -- not physically
accurate, but useful to get a limited sense of depth.
<tt/fade const/ <it/refdist/ gives constant apparent brightness
independent of distance, and may be appropriate for orthographic views.

The <it/refdist/ for linear and const modes is that distance <it/r/
at which apparent brightness should match that in the 1/r^2 modes --
a distance to a "typical" particle.

<tag>
teuben's avatar
teuben committed
</tag>

<tag>
teuben's avatar
teuben committed
</tag>

<tag>
teuben's avatar
teuben committed
</tag>

<tag>
teuben's avatar
teuben committed
</tag>
Turn display of points on or off.  With no argument, toggles display.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Turn display of points on or off.  With no argument, toggles display.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Turn display of textures on or off.  With no argument, toggles.
teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
Turn display of label text on or off.  With no argument, toggles.

teuben's avatar
teuben committed

<tag>
teuben's avatar
teuben committed
</tag>
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 <tt/polysides/ is 4.
teuben's avatar
teuben committed

<tag>