Name
rtrange — raytraces a model and visualizes range data in a UNIX-Plot file.
DESCRIPTION
rtrange operates on the indicated objects in the input model.g and produces a range data UNIX-Plot file of the geometry ray-traced. The algorithm is based on plotting hit distances for all the pixels ray-traced. The output is in the versatile, machine independent, UNIX-Plot file format. This file is a true vector plot which retains the original model units.
The orientation of the rays to be fired may be specified by
the
-a
and
-e
options, in which case the model will be autosized, and the grid
will be centered on the centroid of the model, with ray spacing
chosen to span the entire set of
objects.
Alternatively,
with the
-M
option, a transformation matrix may be provided on standard input
which maps model-space to view-space.
In this case, the grid ranges from -1.0 <= X,Y <= +1.0 in view space,
with the size of the grid (number of rays fired) specified with
-s.
This option is most useful when
rtrange
is being invoked from a shell script created by an
mged(1)
saveview command.
The following options are recognized.
-s#
Number of rays to fire in X and Y directions (square grid). Default is 512 (512x512).
-a#
Select azimuth in degrees. Used with
-e
and conflicts with-M
-e#
Select elevation in degrees. Used with
-a
and conflicts with-M
-M
Read model2view matrix from standard input. Conflicts with
-a
and-e
-U #
sets the Boolean variable use_air to the given value.
-o
output.plot3 specifies a named file for output. By default, the plot is written to standard out.
EXAMPLE
This section shows the ordinary usage of rtrange . For example,
rtrange -s32 model.g all.g > file.plot3
results in a 32 by 32 range data UNIX-plot file of the named model.
The plotfile resulting from rtrange can be viewed directly via plot3-fb :
plot3-fb file.plot3
It can also be rotated by plot3rot and sent to a framebuffer:
plot3rot -a# -e# -g file.plot3 | plot3-fb
Likewise, it can be overlaid onto a solid model in mged :
mged> overlay hide.plot3
SEE ALSO
mged(1), plot3-fb(1), plot3rot(1), rt(1), rtray(1), librt(3), libplot3(3), plot3(5), ray(5V)
DIAGNOSTICS
Numerous error conditions are possible, usually due to errors in the geometry database. Descriptive messages are printed on standard error (file descriptor 2).
BUGS
Most deficiencies observed while using the rtrange program are usually with the librt(3) package instead.