<!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 "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 <CODE>add</CODE> Control Command, and in Data Command mode one can let a command be a Control Command by preceding it with the <CODE>eval</CODE> command. Before we explain the two types of Commands in more detail, a few other concepts are needed: <P> <H2><A NAME="ss4.1">4.1 Textures</A> </H2> <P> <P> <H2><A NAME="ss4.2">4.2 Coordinates and Coordinate Transformations</A> </H2> <P> <P> <H2><A NAME="ss4.3">4.3 Grouping of objects</A> </H2> <P>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. <P> <H2><A NAME="ss4.4">4.4 Control Commands</A> </H2> <P> <P>(see partibrains.c::specks_parse_args) <P>Most (all?) commands can be prefixed with a generic group designation, <CODE>gN</CODE>, to which this command applies. See the <CODE>object</CODE> Data Command how to place different data in different groups. <P>Data Commands can also be given, if prefixed with the <CODE>add</CODE> command. <P> <P> <DL> <P> <DT><B>read <I>specks-file</I>></B><DD><P>read a specks file <P> <DT><B>include </B><DD><P>NOTYET, does the same as the <B>read</B> command. <P> <DT><B>on</B><DD><P> <P> <DT><B>off</B><DD><P> <DT><B>enable</B><DD><P>see the <CODE>on</CODE> command. <P> <DT><B>disable</B><DD><P>see the <CODE>off</CODE> command. <P> <DT><B>eval <I>control-command</I></B><DD><P>This should be a no-op, since it would normally allow you to give a Control Command in Data Command mode. <P> <DT><B>add <I>data-command</I></B><DD><P>This will enter a Data Command while in Control Command mode. <P> <DT><B>async <I>unix-command</I></B><DD><P>This will allow you to execute an arbitrary unix command, the subprocess of which its <I>stdout</I> will be taken as a stream of Control Commands. <P> <DT><B>update </B><DD><P>Ensures the screen is updated. <P> <DT><B>hist <I>datavar</I> [-l] [-c] [-t] [<I>minval</I>] [<I>maxval</I>]</B><DD><P>Generates a histogram of values of the datafield named by <I>dataval</I>. <P>-l logarithmic, -c clipped, -t threshed. <P> <DT><B>bound</B><DD><P>Reports 3D extent of the data <P> <DT><B>speed</B><DD><P>(note that <CODE>fspeed</CODE> has been deprecated) <P> <DT><B>run</B><DD><P> <DT><B>fade</B><DD><P> <DT><B>clipbox [cb] ....</B><DD><P>Selects a 3D clipbox <DL> <DT><B> <I>xmin ymin zmin xmax ymax zmax</I> </B><DD><P> <DT><B> <I>xcen,ycen,zcen xrad,yrad,zrad</I> </B><DD><P> <DT><B> <CODE>on</CODE> </B><DD><P> <DT><B> <CODE>off</CODE> </B><DD><P> </DL> <P> <P> <DT><B>object</B><DD><P> <DT><B>tfm</B><DD><P> <DT><B>bgcolor</B><DD><P> <DT><B>kiractl </B><DD><P>viewing control options for kira (starlab) formatted data that have been read in with the <CODE>kira</CODE> Data Command. <DL> <DT><B> {node|ring} {on|off|root} </B><DD><P> <DT><B> tree {on|off|cross|tick} [<I>tickscale</I>] </B><DD><P> <DT><B> size <I>fac</I> </B><DD><P> <DT><B> span <I>minpix</I> <I>maxpix</I> </B><DD><P> <DT><B> track <I>id</I> </B><DD><P> <DT><B> ??? scale </B><DD><P> </DL> <P> <P> <DT><B>gN <I>control-command</I></B><DD><P>Generic prefix to any control command to act on the selected group <I>gN</I> (N=1,2,3,....). <P> <P>BEGIN !CAVEMENU (virdir emulation) <P> <DT><B>stereo <I>float</I> <I>color</I></B><DD><P>Add stereo separation. Numbers can be 0.02 to 0.1 or -0.02 to -0.1 to swap eyes. <P> <DT><B>snapset FILESTEM [FRAMENO]</B><DD><P>set snapshot parameters <P> <DT><B>snapshot [FRAMENO]</B><DD><P>take a snapshot of the current viewport (uses convert(1)) <P> <DT><B>move on|off</B><DD><P> <DT><B>move-objects on|off</B><DD><P> <DT><B>clip NEAR FAR</B><DD><P>Set or get clipping distances <P> <DT><B>ortho</B><DD><P>NOTYET <P> <DT><B>fov <I>float</I></B><DD><P>Get or set field of view (in degrees) <P> <DT><B>fovy <I>float</I></B><DD><P>Get or set field of view (in degrees) <P> <DT><B>focal <I>float</I></B><DD><P>Get or set the focal length. Use the 's' key to toggle stereo display. The focal length also determines the fly/tran speed. <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>center [<I>X Y Z</I>]</B><DD><P>Get or set the current rotation center (XYZ) for orbit/rotate <P> <DT><B>rdata</B><DD><P>Read a (<CODE>.wf</CODE>) file describing a path through space. <P> <DT><B>readpath</B><DD><P>Read a Wavefront (<CODE>.wf</CODE>) file describing a path through space. <P> <DT><B>play <I>speed</I>[f]</B><DD><P>Play the currently loaded path, at <I>speed</I> times normal speed (with "f" suffice it would play every <I>speed</I>-th frame). <P> <DT><B>frame <I>frameno</I></B><DD><P>Get, or set the current frame the <I>frameno</I>-th. <P> <DT><B>int[erest] [X Y Z Radius]</B><DD><P>Get or set region of interest <P> <DT><B>cen[ter] [X Y Z Radius]</B><DD><P>Get or set region of interest <P> <DT><B>censize RADIUS</B><DD><P>Get or set size of marker / interest-marker size <P>END !CAVEMENU (virdir emulation) <P> <DT><B>step [step-number]</B><DD><P>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. <P> <DT><B>fwd</B><DD><P> <DT><B>gscale</B><DD><P>scaling particles <P> <DT><B>clearobj</B><DD><P> <DT><B>every N</B><DD><P>Get or set the value to display every N-th particle <P> <DT><B>color</B><DD><P> <DT><B>datavar [dv]</B><DD><P> <DT><B>datawait on|off</B><DD><P> <DT><B>lum</B><DD><P> <DT><B>cmap <I>filename</I></B><DD><P>Load (ascii) filename with RGB values <P> <DT><B>boxcmap</B><DD><P> <DT><B>cment</B><DD><P> <DT><B>boxcment</B><DD><P> <DT><B>only</B><DD><P> <DT><B>thresh</B><DD><P> <DT><B>rawdump</B><DD><P> <DT><B>slum</B><DD><P> <DT><B>scale-lum</B><DD><P> <DT><B>see</B><DD><P> <DT><B>show</B><DD><P> <DT><B>showbox</B><DD><P> <DT><B>hide</B><DD><P> <DT><B>hidebox</B><DD><P> <DT><B>box(es) [off|ON|ONLY]</B><DD><P>Toggle box display between <CODE>off</CODE>, <CODE>ON</CODE>, or <CODE>ONLY</CODE>. (notice case sensitivity) <P> <P> <DT><B>boxlabel [on|off]</B><DD><P>Toggle or set box label display mode. <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>go</B><DD><P> <DT><B>gobox</B><DD><P> <DT><B>goboxscale</B><DD><P> <DT><B>psize [float]</B><DD><P>(Note: pointsize is deprecated) <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>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>Toggle the display status of points (the <CODE>point</CODE> status in the top row), or explicitely set point display <CODE>on</CODE> or <CODE>off</CODE>. <P> <DT><B>poly(gon) [on|off]</B><DD><P>Toggle the display status of labels (the <CODE>poly</CODE> status in the top row), or explicitely set polygon display <CODE>on</CODE> or <CODE>off</CODE>. <P> <DT><B>texture [on|off]</B><DD><P>Toggle the display status of textures (the <CODE>tex</CODE> status in the top row), or explicitely set textures <CODE>on</CODE> or <CODE>off</CODE>. <P> <DT><B>label(s) [on|off]</B><DD><P>Toggle the display status of labels (the <CODE>lbl</CODE> status in the top row), or explicitely set labels <CODE>on</CODE> or <CODE>off</CODE>. <P> <P> <DT><B>txscale </B><DD><P> <DT><B>polyorivar</B><DD><P> <DT><B>texturevar</B><DD><P> <DT><B>laxes [on|off]</B><DD><P>Toggle ... <P> <DT><B>polyside(s)</B><DD><P>Number of sides a polygon should have <P> <DT><B>gamma</B><DD><P> <DT><B>alpha [float]</B><DD><P>Get or set the alpha value. <P> <DT><B>fast</B><DD><P>see also <CODE>ptsize</CODE> <P> <DT><B>ptsize</B><DD><P>makes more sense than <CODE>fast</CODE>. <P> <DT><B>fog</B><DD><P> <DT><B>menu fmenu</B><DD><P> <P> <P>BEGIN CAVEMENU pos P1 P2 wall P1 hid [P1] show [P1] h [P1] demandfps [P1] font help ? END CAVEMENU <P> <P> <DT><B>datascale</B><DD><P> <DT><B>where [w]</B><DD><P> </DL> <P> <H2><A NAME="ss4.5">4.5 Data commands</A> </H2> <P> <P>(see also partibrains.c::specks_read) <P>Lines starting with <CODE>#</CODE> will be skipped. The following Data Commands can be placed in a data file. <P>Control Commands can be given, if prefixed with the <CODE>eval</CODE> command. <P> <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??) <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>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>annot <I>[-t timestep] string ...</I></B><DD><P> <P> <P> <DT><B>tfm </B><DD><P>Object-to-world transformation. Either <I>tx ty tz rx ry rz</I> or 16 numbers for 4x4 matrix. (<I>something> must contain <CODE>* </CODE> h p r</I>) <P> <DT><B>eval <I>command</I></B><DD><P>execute a Control Command. <P> <DT><B>feed <I>command</I></B><DD><P>Synonymous for <CODE>eval</CODE> <P> <DT><B>VIRDIR <I>command</I></B><DD><P>Synonymous for <CODE>eval</CODE> <P> <P> <DT><B>filepath <I>path</I></B><DD><P>A colon separate list of directories in which datafiles 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>texture [-lmnMDB] <I>txno file.sgi</I> </B><DD><P> <DL> <DT><B> -l(inear) </B><DD><P> <DT><B> -m(ipmap) </B><DD><P> <DT><B> -n(earest) </B><DD><P> <DT><B> -M(odulate) </B><DD><P> <DT><B> -D(ecal) </B><DD><P> <DT><B> -B(lend) </B><DD><P> </DL> <DT><B>polyorivar</B><DD><P>This will control the positions in space of polygons, as you rotate the world. <P> <DT><B>texturevar</B><DD><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><I>indexno</I> is an integer, 0 being the first one. <P> <DT><B>datavar <I>indexno string float float</I></B><DD><P>Name this variable. <P> <DT><B>datatime <I>time</I></B><DD><P>Label subsequent data with this <I>time</I> (a floating point number). <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 the dataset. The 4th and subsequent columns contain the values of the datavariables as named with the <B>datavar</B> commands. Note that data variables are 0-based. <P> </DL> <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>