home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum23.lzh
/
f23b
/
SOFTWARE
/
PDRAW
/
pdraw.doc
< prev
next >
Wrap
Text File
|
1992-01-19
|
9KB
|
265 lines
PDRAW(L) LOCAL COMMANDS PDRAW(L)
NAME
pdraw - 3D plot program for X-windows and Postscript
SYNOPSIS
pdraw [-v _v_x _v_y _v_z] [-o _o_p_t_i_o_n_s-_f_i_l_e] [-P_p_r_i_n_t_e_r] [-s _s_c_a_l_e]
[-e] [-h] [-nosort] [-ps] plotfile1 plotfile2...
DESCRIPTIONS
Pdraw is a program for drawing 3D plots on X10 or X11 win-
dows. The program will also produce a POSTSCRIPT plot which
can be dumped out to an APPLE Laserwriter. Pdraw reads in
x-y-z data from a _p_l_o_t-_f_i_l_e and manipulates that data
according to options specified either in the command-line or
in a _o_p_t_i_o_n_s-_f_i_l_e. The _p_l_o_t-_f_i_l_e can be compressed (see
compress[1]); compressed files will be uncompressed automat-
ically. The program then plots lines on a screen or dumps
the plots to a POSTSCRIPT file.
The _p_l_o_t-_f_i_l_e input data consists of alternating x, y and z
values, in the format shown below.
Data File Format (plot-file)
xmin xmax ymin ymax zmin zmax
ncurves
npts
z1
z2
..
..
..
npts
z1
z2
..
..
..
In the above, _x_m_i_n, _x_m_a_x, _y_m_i_n, _y_m_a_x, _z_m_i_n and _z_m_a_x are
lower and upper bounds of the desired plot, _n_c_u_r_v_e_s are the
number of curves to be plotted, and _n_p_t_s are the number of
points in each curve. The data file can consist of more
than one set of curves to be plotted; each set (i.e. one set
for each separate graph) is separated from the next by a
blank line.
Upon starting up the program, pdraw will read in the data
stored in the _p_l_o_t-_f_i_l_e, as well as any plotting options
specified either in the command line or in the _o_p_t_i_o_n_s-_f_i_l_e.
Pdraw then uses the given view direction to rotate and
transform the plot onto a plane perpendicular to the viewing
vector. Currently, only parallel projection is supported.
Sun Release 4.0 Last change: 4 September 1990 1
PDRAW(L) LOCAL COMMANDS PDRAW(L)
If the program is being run under X-windows, the plot will
then be drawn on the screen. The viewing vector can be
changed using the "H", "J", "K", "L" and "O" keys on the the
keyboards; the plot on the screen can be rotated sideways
using the "H" or "L" keys, rotated up or down using the "J"
and "K" keys, and drawn with the original viewing vector
using "O". The "A", "S", "D" and "F" keys will produce 90o
rotations. "Z" will plot the image projected on the x-y
plane (z=constant), "Y" will plot the image projected on the
x-z plane (y=constant), and "X" will plot the image pro-
jected on the y-z plane (x=constant). The final view angle
will be saved and used for the POSTCRIPT plot. Finally, the
user will be prompted as to whether or not the POSTSCRIPT
plot is to be sent to a printer.
OPTIONS
-v _v_x _v_y _v_z
reads in the viewing eye position, relative to (0,0,0).
The plot will be rotated and transformed so that the
z-axis is parallel to this position. For example, a
view position of (1,0,0) means that the 3D structure is
being viewed with parallel projection from the x-axis.
-o _o_p_t_i_o_n_s-_f_i_l_e
reads plotting options from the file _o_p_t_i_o_n_s-_f_i_l_e.
Each option specification consists of a keyword and its
corresponding value. The parser recognizes only a lim-
ited set of keywords; their values are either numbers,
quoted strings, or the words "on" and "off". All the
words in the option specification must be on the same
line. The pound sign (#) indicates that the remainder
of the line is a comment to be ignored by the parser.
List of Options (options-file)
xlabel "LABEL" #[default = "X-Axis"]
- for the x-label
ylabel "LABEL" #[default = "Y-Axis"]
- for the y-label
zlabel "LABEL" #[default = "Z-Axis"]
- for the z-label
toplabel "LABEL" #[default = "3D Line Plot"]
- for the top-label
equalscale on/off #[default = on]
- for equal x-y scaling
postscript on/off #[default = on]
- for postscript (PS) plot
printplot on/off #[default = off]
- send PS file to printer
noplot on/off #[default = off]
- no graphics plot
printer "PRINTER" #[default =
Sun Release 4.0 Last change: 4 September 1990 2
PDRAW(L) LOCAL COMMANDS PDRAW(L)
$PRINTER] - define the printer
line on/off #[default = on]
- draw the line
linechange on/off #[default = off]
- change the linetypes
marker on/off #[default = off]
- draw the marker
markerchange on/off #[default = off]
- change the markertypes
hiddenline on/off #[default = off]
- for hidden-line drawings
nosort on/off #[default = off]
- for hidden-line drawings
scale [0.1 - 1.0] #[default = 1.00]
- scales the PS plot
xticks [1 - 20] #[default = 2]
- no. of x-divisions
yticks [1 - 20] #[default = 2]
- no. of y-divisions
zticks [1 - 20] #[default = 2]
- no. of z-divisions
-P_p_r_i_n_t_e_r
specifies which printer to which to send the postscript
plot. The current default sets the printer name to the
environment variable $PRINTER. If this variable is not
set, then the printer used is the lp550M printer in
550M Cory.
-s _s_c_a_l_e
sets a scale factor. This is used only for POSTSCRIPT
plotting.
-e forces _u_n_e_q_u_a_l scales to be applied to the x, y and z
axes. The boundary of the 3D object will then resemble
a cube.
-h draws polygons with hidden-lines.
-nosort
prevents sorting for the hidden-line option.
-noplot
prevents plots on the graphics display.
-print
sends plots to the printer automatically.
-ps turns the postscript plotting option off.
_h_o_s_t:_d_i_s_p_l_a_y
opens a window on the given host and display
Sun Release 4.0 Last change: 4 September 1990 3
PDRAW(L) LOCAL COMMANDS PDRAW(L)
=geom
-rv
-bw _b_o_r_d_e_r-_w_i_d_t_h
-bd _c_o_l_o_r
-fg _c_o_l_o_r
-bg _c_o_l_o_r
sets input options for the X-window system.
BUGS
Not really that many. The POSTSCRIPT labels need to be
adjusted. The labels don't come out well when the picture
is rotated beyond the default view. The parser needs to be
improved. There should be a better way to put change line-
types and markertypes. Log axes might be nice. Also should
incorporate drawplot modifications here.
AUTHOR
Kenny K.H. Toh (ktoh@mascot.berkeley.edu)
FILES
_d_a_t_a_p_l_o_t._p_s temporary POSTSCRIPT file
SEE ALSO
contour(L), drawplot(L)
Sun Release 4.0 Last change: 4 September 1990 4