Name
azel — rotate 3-D Cartesian data in azimuth and elevation
DESCRIPTION
azel
converts between right-handed Cartesian coordinate systems,
an application-geometry system
x, y, z
and a viewer-embedded system
d, h, v.
These systems differ by rotation in azimuth and elevation
about their common origin.
Input comes from
infile
and output goes to
outfile
if they are specified, otherwise
azel
uses stdin and stdout, respectively.
Each line of input must contain three numbers separated by
white space.
Unless the
-i
option (q.v.) is specified,
azel
interprets each triple as the
x, y, z
coordinates of a vector, and prints out its
d, h, v
coordinates.
Any other text on the input line beyond the triple is copied verbatim.
Options
The command-line options and their meanings are given below.
-a
azim
Specifies azimuthal rotation of azim degrees. Default is 0.
-e
elev
Specifies elevation rotation of elev degrees. Default is 0.
-c
celsiz
Specifies a cell size of celsiz. Output vectors are scalar multiplied by 1/celsiz. Default is 1. Useful with the
-r
option to bin output data into cells.-i
Causes azel to perform the inverse rotation. The input is transformed from viewer to application-geometry coordinates (i.e., from d, h, v to x, y, z). Incompatible with the
-p
option.-p
Causes azel to project the output vectors onto the hv plane. This gives grid-plane coordinates. Incompatible with the
-i
option.-r
Causes azel to round each coordinate of the output vectors to the nearest integer. Useful with the
-c
option to bin output data into cells.
DEFINITIONS
The viewer coordinates are defined so that positive d points toward the viewer, positive h (horizontal) points to the viewer's right, and positive v (vertical) points up. When azim = elev =0 , the two coordinate systems coincide, in which case azel performs the identity transformation. Azimuth is the angle in the dh plane from positive h to positive y, measured toward positive d. Elevation is the angle in the dv plane from positive v to positive z, measured toward positive d. In the forward direction the azimuthal rotation is performed before the elevation, while in the inverse direction, the elevation is undone before the azimuth. Thus, the z axis is always normal to the h axis. When azim = 90 and elev = 0, x = -h, y = d, and z = v. When azim = 0 and elev = 90, x = -v, y = h, and z = d.