Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ROTCVPH(6)  —  GAMES AND DEMOS

NAME

rotcvph − rotate convex polyhedron

SYNOPSIS

/usr/demo/rotcvph file

DESCRIPTION

Rotcvph rotates a convex polyhedron with hidden surfaces removed.  Using the SunCore Graphics Package, a 3-D 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 following commands may be typed at any time:

nDisplay successive views with no waiting. 

wWait for <SPACE> to be typed before displaying each view. 

qExit the program. 

The format of the polygonal object definition is illustrated by this example of the definition of a pyramid:

55
-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
44 3 2 1
31 5 4
32 5 1
33 5 2
34 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, z.  Lines v+3 through v+p+2 (where p is the number of polygons) give polygon descriptions.  The first number 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 whitespace. A maximum of 400 vertices and 400 polygons may be defined. The polygon definitions may contain a maximum of 1600 instances of the vertices.  /usr/demo/data contains several object definition files, including icosa.dat, socbal.dat, and pyramid.dat. 

The above format may be used to define non-convex objects.  The program will display these objects but hidden surface computations will not be done correctly. 

FILES

/usr/demo/data/∗.datSample object definition files

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.

Sun Release 2.0  —  Last change: 22nd February 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026