Name

plrot — rotate, translate, or scale a UnixPlot file

DESCRIPTION

Plrot will rotate translate or scale a UnixPlot file (see plot(5)). Any number of the above options can be given. Each operation is performed left to right in the order in which they appear on the command line, and the operations are concatenated. It is important to note that rotations are not commutative, so the order they are specified in is important. Typing the command without any arguments gives a useful summary.

The lower case -x# -y# -z# flags perform a rotation about the X, Y, and Z axis respectively by the given number of degrees. A positive value indicates a right handed rotation. Upper case -X# -Y# -Z# are translations along these axis in whatever units the plot file is in. The -s# flag applies a scale factor up (> 1) or down (< 1) to the plot.

The -a# -e# flags are for azimuth and elevation about the center point. They are really shorthands for positive Z axis and negative X axis rotations respectively, and should be used in the order shown for the proper combined effect to occur. These flags also cause the plot to auto-center based on the "space" command in the plot file, and the new "space" command will be shrunk to fit the rotated plot as tightly as possible.

The -M flag causes the plot to auto-center based on the "space" command in the plot file in much the same way that the rt(1) ray tracer does to a model bounding box. I.e. a sphere is fit to this space and the diameter and center of this sphere are used as the center and width of the plot in all three dimensions. This has the advantage of keeping the entire model in view from any angle, and is invariant with respect to viewing direction. It has the disadvantage that the "space" will be enlarged on every cascaded pass through plrot(1) where the -M flag is used.

The -S# flags takes a quoted string of 6 floating point numbers, which are immediately output as a "space" command, and which override any "space" commands found in the input file or which are computed by

The -v flag signals that verbose mode is requested. When set, the initial transformation matrix is printed. In addition, every time a space command is encountered in the input file, the old and new bounding RPP is printed.

The -m# flag takes a quoted string of 16 floating point numbers as its parameter. This string is a 4x4 rotation matrix (see h/vmath.h for details). Note that when using this flag, do not use -a#, -e#, or -g.

UnixPlot is traditionally a first quadrant 2D plotting space with X increasing to the right of the plot, and Y increasing up the plot. The "front" of a solid model in the BRL-CAD Package is traditionally defined by the right handed system of X coming out of the screen toward you, Y increasing to the right, and Z increasing up the display (elevation above the XY ground plane). The -g flag is a convenient shorthand to transform azimuths and elevations described in gift notation (as degrees off the front or -X view) into the UnixPlot coordinate system for display. If used, this option should usually appear as the last argument, because it acts by modifying the rotation already established. The -g command has exactly the same effect as giving -z-90 -x-90 in the same place.