VisionX V4 | VGEN3D | VisionX V4 |
vgen3d − generate 3D object scenes |
vgen3d [pf=<value>] [of=<outputfile>] [e=x[,y[,z]]] [r=x[,y[,z]]] [p=x,y,h] [c=<value>] [s=<value>] [ro=x,y,z] [tr=x,y,z] [v=<value>] [bg=<value>] [f=<value | x,y,z>] [-b] [-z] [-nr] [-f] [-s] [-v] |
Vgen3d generates a 3-dimensional object scene containing one or (with a parameter file) more objects. Objects can be spheres, ellipsoids, rectangular parallelpipeds, elliptic cylinders, circles, and squares. Parameters for a single object may be specified on the command line, while multiple object scenes require a parameter file (see below). In addition, the background voxel intensity may be set and the bounding box may be manipulated in several ways. |
A whitespace-delimeted parameter file consists of lines of the following format: xlen ylen zlen xctr yctr zctr roll pitch yaw density shape where (xlen, ylen, zlen) specify the dimensions of the object, (xctr, yctr, zctr) is the center of the object, (roll, pitch, yaw) specify the object’s orientation (see standard form, below), and density determines the voxel intensity. Each of these parameters can be either integral or in floating point representation. Note that object densities will be rounded to positive integers unless the -f flag is used (described below). Shape is a single character (’E’, ’R’, or ’C’), specifiying whether the shape to be generated is an ellipsoid (including spheres), rectangular parallelpiped, or elliptic cylinder, respectively. The header of the parameter file may contain an arbitrary number of lines, each preceded by a ’#’ character, followed by a blank line. Objects will be generated in the order they appear in the parameter file, overwriting voxels in which they overlap with a previously generated object. Thus, it is important to note the order of objects listed in the parameter file and their respective densities. It is important to note that object description lines may be commented out using a ’#’ character at the beginning of the line. Thus, objects may easily be selectively rendered. Example: #UU.VISX vgen3d parameter file 20 20 20 0 0 0 0 0 0 255 E This example renders a sphere, an ellipsoid, and a rectangular parallelpiped. Note that the third object (a cylinder of diameter 10 and height 15) has been commented out, and will not be rendered. |
pf=<parameter file> |
specifies an optional vgen3d parameter file (as described above), for multiple object scenes. Note, if pf= is used without a filename, a paramater file will be expected on standard input. This is useful, as the output of v3ps -g may be piped into vgen3d pf=<blank>. |
of=<output file> |
specifies a VisionX output file. |
e=<x[,y[,z]]> |
the axes of a single ellipsoid to be generated. If one value is given, it specifies a sphere. Two values specify an ellipse or circle. Three values specify an arbitrary ellipsoid. |
r=<x,y,z> |
the sides of a single rectangular parallelpiped to be generated. If one value is given, it specifies a cube. Two values specify an rectangle or square. Three values specify an arbitrary rectangular parallelpiped. |
|
p=<x,y,h> |
the dimensions of single elliptic cylinder to be generated. |
c=<length> |
the diameter of a single circle to be generated. |
s=<length> |
the side of a single square to be generated. |
ro=<xangle,yangle,zangle> |
set the angles of rotation (in degrees) about the cartesian x, y, and z axes (single object). These correspond to object "roll", "pitch", and "yaw", respectively, when an object is of standard form (see below). |
tr=<xtrans,ytrans,ztrans> |
set the amount of translation with respect to the cartesian axes. |
v=<value> |
set the voxel value of the single object to be rendered (default=255). |
bg=<value> |
set the voxel value of the background (default=0). |
f=<value | x,y,z> |
set the amount of "fudge space" used to expand the tight bounding box. If one value is given, the equal padding is applied in each dimension. Alternatively, the x, y, and z padding values may be specified separately. |
-b |
apply the rotations in backward order (z, y, then x). |
||
-z |
translate so that the (xlo, ylo, zlo) corner of the bounding box is at (0,0,0). |
||
-nr |
forbid object recentering. The default operation uses object recentering (moves object center by 0.5 in one or more directions) to improve overall geometric rendering. |
||
-f |
specify floating-point output format. This is useful for generating objects with negative density. The default output format is unsigned byte. |
||
-s |
specify short integer output format. The default output format is unsigned byte. |
||
-v |
verbose operation. Gives some runtime information. This may be useful when running a large parameter file. |
An object in standard form is longest along the x-axis and shortest along the z-axis. This allows the rotational angles described above to correspond to roll, pitch, and yaw. |
v3ps(1) |
W. J. Kostis and A. P. Reeves |