Programming and Graphics

(Kiana) #1

B Summary ofVogleFunctions 323


Rectangles and polygons


rect (x1, y1, x2, y2) Draw a rectangle
polyfill (onoff) Set the polygon fill flag
polyhatch (onoff) Set the polygon hatch flag
hatchang (angle) Set the angle of the hatch lines
hatchpitch (pitch) Set the distance between hatch lines
poly2 (n, points) Construct an (x, y) polygon
from an array of point
poly (n, points) Construct a polygon from an array of points
makepoly () Open a polygon constructed by a series
of move-draws and closed by closepoly
closepoly () Terminate a polygon opened by makepoly
backface (onoff) Turn on culling of backfacing polygons
backfacedir (clockwise) Set backfacing direction to clockwise
or anti-clockwise

Patches


patchbasis (tbasis, ubasis) Define the t and u basis matrices of a patch
patchprecision (tseg, useg) Set minimum number of line segments
making up curves in a patch
patchcurves (nt, nu) Set the number of curves making up a patch
rpatch (gx, gy, gz, gw) Draw a rational patch in the current basis,
according to the geometry matrices
gx, gy, gz, and gw
patch (gx, gy, gz) Draw a patch in the current basis
according to the geometry matrices
gx, gy, and gz

Objects


makeobj (n) Commence the object number n
closeobj () Close the current object
int genobj () Get a unique object identifier
int getopenobj () Get the number of the current object
callobj (n) Draw object number n
int isobj (n) Return non-zero if an object numbered n
has been defined
delobj (n) Delete the object number n
loadobj (n, filename) Load the object number n
in the file filename
saveobj (n, filename) Save the object number n into file filename;
doesnotsave objects called inside object n
Free download pdf