ROTCVPH(6) Games Manual ROTCVPH(6)
NAME
rotcvph  rotate convex polyhedron
SYNOPSIS
/usr/demo/rotcvphfilename
DESCRIPTION
rotcvph rotates a convex polyhedron with hidden surfaces removed.
Using the SunCore Graphics Package, a 3D projection is drawn on the
Sun Monochrome Bitmap Display. The mandatory file argument contains a
polygonal object definition as described below.
Initially the program displays a fixed view of the object. The follow
ing commands may be typed at any time:
n Display successive views with no waiting.
w Wait for SPACE to be typed before displaying each view.
q Exit the program.
The format of the polygonal object definition is illustrated by this
example of the definition of a pyramid:
5 5
1.0 1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0
1.0 1.0 1.0
1.0 1.0 1.0
1.0 1.0 1.0
0.0 0.0 1.0
4 4 3 2 1
3 1 5 4
3 2 5 1
3 3 5 2
3 4 5 3
The first line gives the number of vertices followed by the number of
polygons. The second line gives the coordinates of a bounding box for
the object. Minimum and maximum coordinate values are given for each
of three dimensions in the order minx, maxx, miny, maxy, minz, maxz.
Lines 3 through v+2 (where v is the number of vertices) give vertex
coordinates in the order x, y, ,IR z . Lines v+3 through v+p+2 (where
p is the number of polygons) give polygon descriptions. The first num
ber is the number of vertices for the polygon. Succeeding numbers on
the line are indices into the vertex list. Polygons should be planar.
Coordinates are given in floating point format and everything else is
integer. Entries on a given line are separated by arbitrary white
space. A maximum of 400 vertices and 400 polygons may be defined. The
polygon definitions may contain a maximum of 1600 instances of the ver
tices. /usr/demo/data contains several object definition files,
including icosa.dat, socbal.dat, and pyramid.dat.
The above format may be used to define nonconvex objects. The program
will display these objects but hidden surface computations will not be
done correctly.
FILES
/usr/demo/data/*.dat sample object definition files
icosa.dat
socbal.dat
pyramid.dat
BUGS
All floating point transformations are done twice for each view, once
to draw the object and once to undraw it.
Lines which are common to two visible polygons in a view are drawn
twice, once for each polygon.
16 February 1988 ROTCVPH(6)
