Name

rtg3 — raytrace a model, writing a COVART (GIFT) 3-component format shotline file

DESCRIPTION

Rtg3 operates on the indicated objects in the input model.g and produces a GIFT/COVART shotline file with three components per line, and both entrance and exit obliquity angles on standard output. The region ID field of the output file is set to the region id of each intersected region (partition). If the ray partition is followed by air, the aircode for the air region (and the line-of-sight thickness of the air) is noted on the shotline header line.

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 rtg3 is being invoked from a shell script created by an mged(1) saveview command. Note that it conflicts with -G# and -g#; negative hit distances have been seen when this conflict was not avoided.

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.

-g#

Select grid cell width. Do not use with the -s# option.

-G#

Select grid cell height. If not specified, cell height equals cell width. Do not use with the -s# option.

-U #

sets the Boolean variable use_air to the given value. The default for rtg3(1) is on, i.e. -U1, but the effect of air regions may be disabled with -U0.

-o

output.cov specifies a named file for COVART-format output. By default, the shotlines are written to stdout.

-x#

Set librt debug flags to (hexadecimal) number.

-c set ray_data_file=ray_file_name

specifies a file name for ray data output. This output consists of one line of data for each shotline in the shotline output file. Each line contains azimuth, elevation; x, y, and z of the ray start point; x, y, and z of the ray direction; the corresponding line number in the shotline file; and the coordinates of the first hit point along this ray.

-c set rt_cline_radius=#

Tells rtg3(1) to use the provided number (in millimeters) as the additional radius to add to CLINE solids.

-c set save_overlaps=1

Tells rtg3(1) to act like the FASTGEN4 raytracer. Specifically, overlap handling is changed to agree with that of FASTGEN4.

The rtg3 program is a simple front-end to librt(3) which is most useful when used with mged(1) and covart(1V).

A color vector display of ray-model intersections can be written to rtg3.plot3 by specifying the -X80000000 option. The resulting plot file can be displayed with plot3-fb.