POLAR-FB(1)

NAME
polar-fb - produce polar plots on a frame buffer

SYNOPSIS
polar-fb [ options ] [ file ]

DESCRIPTION
Polar-fb reads data for a normalized polar function (npf) from file, and produces the graph on a frame buffer. If file is not specified, the standard input is read. The input should be a sequence of numbers; it is interpreted as pairs of polar coordinates. The first number in each pair is interpreted as a value of theta, the second as a value of rho.

An npf is a function, phi : [0, 2pi) → [0, 1], that maps angles between 0 and 2pi (i.e., between 0 and 360 degrees) into the unit interval. A typical application for an npf is to describe some attribute of an MGED model as a function of the direction from which the geometry is viewed.

In the absence of command-line options, polar-fb fills the default area of the frame buffer (typically 512×512 pixels) with a background color and displays the interior of the npf (i.e., {(theta, rho) | rho ≤ phi(theta)}). The graph is positioned with its origin O, at the center of the frame-buffer, oriented with theta 0 at the bottom, and scaled so that the unit circle just fits in the frame buffer. The graph consists of concentric regions colored blue, green, yellow, orange, or red, depending on distance from O. Finally, polar-fb superimposes a polar grid in black.

In the description that follows of the valid options, ``r g b'' is a triplet of integers in {0, ..., 255} that specifies a color in terms of intensities for red, green, and blue, respectively. The options and their meanings are:

-F fbfile
    Send the results to the frame buffer fbfile. In the absence of the -F option, if the shell variable FB_FILE is defined, its value is used. Otherwise, the host's default frame buffer is used.

-N scr_height
    Set screen (frame-buffer) height to scr_height pixels.

-S scr_size
    Set screen (frame-buffer) height and width to scr_size pixels.

-W scr_width
    Set screen (frame-buffer) width to scr_width pixels.

-a u v
    Plot only the portion of the npf between u and v degrees (i.e., u ≤ theta ≤ v). Default is u 0, v 360.

-b r g b
    Set the background color to (r, g, b). Default is (255, 255, 255) (i.e., white).

-c  Clear the frame buffer to the background color.

-e  Use empty-interior mode. This is useful with the -p option.

-g  Do not plot the polar grid.

-h  Use high-resolution mode. The frame buffer is 1024×1024 pixels. This has the same effect as -S 1024 .

-i r g b
    Display the interior of the npf with constant color (r, g, b).

-l r g b
    Display the interior of the npf in annular regions whose colors are a linear ramp from (0, 0, 0) at O, to (r, g, b) at rho 1.

-m  Merge the graph with the current contents of the frame buffer. Given this option, polar-fb does not modify the area of the frame buffer outside the npf.

-n  Use no-warning mode. If this option is specified, polar-fb will abort if it detects any irregularities in the input stream.

-o x y
    Translate the graph, putting O at frame-buffer location (x, y).

-p r g b
    Plot the perimeter of the npf in the color (r, g, b).

-q q
    Set the angular quantum to q degrees. The graph will consist of circular sectors, with the arc of each sector subtending an angle of q. Default is 1.

-r  Interpret the theta values on the input in radians. Default is degrees.

-s s
    Scale the graph so that the unit radius is s pixels. The dimensions of the background region of the graph will be 2s×2s pixels.

-t t
    Rotate (twist) the npf t degrees clockwise. Negative values of t specify counterclockwise rotation. Any bounds specified with the -a option are applied before the npf is rotated.

-w  Display the interior of the npf in angular wedges colored blue, green, yellow, orange, or red, depending on radius.

-z side
    Plot only one half of the graph. Side may be either of the characters `l' or `r', which specify the left and right halves of the graph, respectively. This functionality could be duplicated through judicious combination of the -a and -t options.

SEE ALSO
brlcad(1)

AUTHOR
Paul J. Tanenbaum, BRL/VLD-GSB