VisionX V4V3DVisionX V4
NAME

v3d - 3D image visualization tool

SYNOPSIS

v3d [-H] [:|-d|-display] [g=|geometry=|-g|-geometry ] [-tiny|-small|-medium|-large|-huge] [cf=options_file] [mf=menu_file] [nc=colors] [if=]infile [ig=]infile2 [of=]ofile [t=title] [-c] [-v] [-D]

DESCRIPTIONS

V3d is a program for rendering 3D data structures on X11 systems. It is based on the Pdraw public domain software package. The user manipulates the data as objects, which are themselves composed of polygons which contain the actual 3D points. In addition, v3d can render slices of VisionX image sequences alone or simultaneously with the polygonal objects. V3d reads in x-y-z data from a plot-file and/or 3D imagery from a VisionX image sequence. The data is manipulated according to options specified either in the command-line or in an options-file (a default options file called .v3drc will be read if it exists in the same directory as the program).

VisionX Graph format:

This is the default format. The VisionX graph format supports four different kinds of vectors:

1. Bounding Box: contains either four or six points (depending on the presence of Z-axis information). If no bounding box is given, v3d calculates one from the data maxima.

2. Object ID: Every vector of this type creates a new object in the internal data structure, and all polygons which follow (until a new object id is reached) belong to the object. If no object information is given, v3d assumes all the polygons belong to a single objects which it labels as 1 by default.

3. 2-D Vertices: Contains a polygon specified by any given amount of (x,y) pairs. When these are read, v3d sets z=0.

4. 3-D Vertices: Contains a polygon specified by any given amount of (x,y,z) points. Since v3d is a 3D visualization program, this kind of vector is more common than the 2D vertex.

All objects have 4 attributes associated with them: An object ID, an object color (specifies the color of the outline), a fill color (for filling the polygons) and a fill flag for selectively filling some polygons (who have the flag set to on) while leaving others as outlines.

Upon starting up the program, v3d will read in the data stored in the plot-file, as well as any plotting options specified in the options-file (or in .v3drc if it exists). v3d then uses the given view direction to rotate and transform the plot onto a plane perpendicular to the viewing vector. Currently, only parallel projection is supported. If the program is being run under X-windows, the plot will then be drawn on the screen.

DATAFILES

if=<datafile>

specifies VisionX graph or 3D image data file.

ig=<datafile>

specifies a second VisionX data file when displaying both a VisionX graph file along with a 3d image in slice mode. The data bounding box is formed by the union of the two individual bounding boxes.

of=<vx_image_seq_file>

selects a non-interactive mode of operation and specifies the result file. In this case, the data is read and processed using the commands options file specified with "cf=" flag. A VisionX image is written to the output file when a "dump" command occurs in the command file. Note, to pipe the output to stdout use "of= |".

DISPLAY AND WINDOW OPTIONS

: | -d | -display <display>

X window display

g= | geometry= | -g |-geometry <WxH+X+Y>

X window geometry

-tiny | -small | -medium | -large | -huge

sets the initial display size to 64x64, 256x256, 512x512, 800x800, or 1024x1024 respectively

nc=colors

specifies number of colors to use.

MACRO AND MENU FILES

cf=<options file>

specifies command options file.

mf=<options file>

specifies the menu file.

OTHER COMMAND LINE OPTIONS

t=<title>

set the plot title.

-c

dumps all of the v3d commands to stdout.

-v

selects verbose mode.

-D

selects debugging mode.

KEYBOARD COMMANDS

H, J, K, L, and O

rotate view sideways using the "H" or "L" keys, rotate up or down using the "J" and "K" keys, and drawn with the original viewing vector using "O" (the default viewing vector places the xmin,ymin,zmin point closest to the viewer). The angle step for the rotations can be modified with the anglestep command (see under options).

A, S, D and F

keys will produce 90° rotations.

1, 2, 3

rotate object by anglestep about the x, y, z, axes respectively.

Z

will plot the image projected on the x-y plane (z=constant),

Y

will plot the image projected on the x-z plane (y=constant),

X

will plot the image projected on the y-z plane (x=constant).

Q

will quit the program.

:

will invoke the Command Window and make the cursor jump to the command line.

C

will invoke the Command Menu containing all the v3d commands.

MOUSE

You can also click the mouse (LEFT or RIGHT) on the objects themselves to highlight them and see them better, with the use of the command line, the objects can be modified, deleted, or painted a different color. Use the MIDDLE mouse button to drag and set the view position.

V3D COMMANDS

The following commands may be entered on the command line or included in a command-options file. Note that the default command aliases are shown in (). The input parameters shown as <>. Optional parameters are given in [].

FILE COMMANDS

load (ld) <filename>

load a new data file.

load2 (l2) <filename>

load a second data file.

save (sv) <filename>

save poly in <filename>.

dump (df) <filename>

save the current view to the VisionX dump image set.

dumpfile (df) <filename>

set VisionX image sequence <filename>.

dumpgray (dg) [on | off]

dump gray scale image sequence.

psdump (ps) <filename>

send plot to Postscript file <filename>.

colorps (cps) [on | off]

generate Color Postscript.

eps (eps) [on | off]

generate Encapsulated Postscript

commandfile (cf) <filename>

load in and execute the specified option file.

RENDERING COMMANDS

X11 (x11)

selects X11 point, line, and surface rendering.

zindex (zi)

selects VisionX zindex rendering.

range (rn)

selects VisionX range rendering.

lightmodel (lm)

selects VisionX lightmodel rendering.

wireframe (wf)

selects VisionX wireframe rendering.

slice (sl)

selects VisionX slice rendering (requires a VisionX graph and a VisionX 3d image file)

showboundaries (sb) [on | off]

draw lines of polygons.

showsurfaces (ss) [on | off]

draw filled surfaces of polygons.

showpoints (sp) [on | off]

draw markers for each object.

fastdrag (fd) [on | off]

turn off line drawing (i.e. draw surfaces only) in X11 render mode while dragging the object view with the MIDDLE mouse button.

marksize (ms)

marker size for single data points.

marker (mk) <num>

select a marker for single data points. [p-point c-circle s-square]

nosort (ns) [on | off]

sort polys in the Z dimension.

show

used within a command options file to update the plot window. (e.g. for doing animation)

COLOR COMMANDS

linecolor (lc) [id1 [id2]] [color|x|y|z|-x|-y|-z]

set the line color optionally for a single object, a range of objects, or all objects. Selecting x, y, or z colors the objects based on the selected lut and the object position on the selected axis. Selecting -x, -y, or -z colors the objects in the reverse order.

fillcolor (fc) [id1 [id2]] [color|x|y|z|-x|-y|-z]

set the fill color optionally for a single object, a range of objects, or all objects. Selecting x, y, or z colors the objects based on the selected lut and the object position on the selected axis. Selecting -x, -y, or -z colors the objects in the reverse order.

background (bg) [color]

set the color used for the background (outside axes).

foreground (fg) [color]

set the color used for axes and labels.

cubecolor (cc) [color]

set the background color used within the axes.

pickcolor (pc) [color]

set the color used to show selected polys.

heat (ht)

use heat scale color look-up-table.

gray (grey)

use grey scale color look-up-table.

olut (ol)

reset to the original color look-up-table.

vlut (vl) <lut file>

read the specified VisionX lut file.

AXES COMMANDS

tiny | small | medium | large | huge (ty|sm|md|lg|hg)

set the size of display window to 64,256,512,800,1024 square pixels respectively.

winsize (ws) <value>

specify a square window size.

xlabel | ylabel | zlabel | toplabel (xl|yl|zl|tl) <label>

set the corresponding axis labels.

drawaxes (ax) [on | off]

display axes.

drawticks(dt) [on | off]

display tickmarks.

xticks | yticks | zticks (xt|yt|zt) <count>

set the number of tick marks on any axis. (0 for none)

xmin|xmax|ymin|ymax|zmin|zmax (x0|x1|y0|y1|z0|z1) <value>

set the min/max value of any axis.

obox (bb) [expand]

use the original data bounding box optionally expanded by given factor.

SCALING COMMANDS

equalscale (es) [on | off]

zscale (sc) <value>

z axis scale <value>

zmag (zm) [<value>]

set the magnification of the z axis.

zoom (zo) <value>

bounding box zoom factor.

VIEW ORIENTATION COMMANDS

theta | phi (th | ph) <degrees>

set the viewing angle.

xrot | yrot | zrot (xr | yr | zr) <degrees>

set the rotation angle about the respective axis.

anglestep (as) <degrees>

set the angle step increment.

xview | yview | zview | oview (xv | yv | zv | ov)

x, y, z, or original axis view

up | down | left | right (up | dn | lt | rt)

rotate the object in that direction by <anglestep>.

up90 | down90 | left90 | right90 (u90|d90|l90|r90)

rotate the object in that direction by 90 degrees.

rotx | roty | rotz (rx | ry | rz)

rotate the object in that direction by <anglestep>.

negx | negy | negz (nx | ny | nz)

rotate the object in that direction by -<anglestep>.

OBJECT SELECTION

nextpoly (np)

select next poly in list.

prevpoly (pp)

select previous poly in list.

dumppoly (dp)

disply selected poly information.

SLICE CONTROL

x-slice | y-slice | z-slice (sx|sy|sz) <value>

set the respective slice position. Empty <value> turns slice off.

slice-dx | slice-dy | slice-dz (dx|dy|dz) <value>

move corresponding slice by <value>

GENERAL COMMANDS

help (?) [<keyword>]

display the list of commands.

verbose (v)

enable verbose mode.

reset ()

reset many plot options.

alias () <command> <alias>

assign an alias to a command

debug (DB) [on | off]

display debug information.

verbose (v) [on | off]

display general information.

quit (q)

quit v3d.

BUGS

The save option has not been fully implemented yet (i.e. it doesn’t work). A clipping routine is needed for when the box extrema (i.e. xmax) are changed.

AUTHOR

R. J. Prokop and A. P. Reeves

First v3d - Daniel Roitman

Original Pdraw - Kenny K.H. Toh (ktoh@mascot.berkeley.edu)

FILES SEE ALSO

contour(L), drawplot(L)