A polygon is composed of a number of coplanar line segments connected end to end to form a closed shape.
In VOGLE curves are estimated by a series of line segments, and thus may be included easily into polygons.
Draw a rectangle. Note: rectangles are regarded as polygons, so if polyfill or polyhatch has been called with 1, the rectangle will be filled or hatched accordingly.
Fortran: subroutine rect(x1, y1, x2, y2) REAL x1, y1, x1, y2 C: vogle_rect(x1, y1, x2, y2) float x1, y1, x2, y2; Pascal: procedure Rect(x1, y1, x2, y2: real)
Set the polygon fill flag. This will always turn off hatching. A non-zero integer or LOGICAL .true. turns polyfill on.
Fortran: subroutine polyfill(onoff) logical onoff C: vogle_polyfill(onoff) int onoff; Pascal: procedure PolyFill(onoff: boolean)
Set the polygon hatch flag. This will always turn off fill. A non-zero integer or LOGICAL .true. turns polyhatch on. Note that hatched polygons must initially be defined parallel to the X-Y plane.
Fortran: subroutine polyhatch(onoff) logical onoff C: vogle_polyhatch(onoff) int onoff; Pascal: procedure PolyHatch(onoff: boolean)
Set the angle of the hatch lines. The angle is in degrees. Zero degrees is on the negative X axis. Positive values are counterclockwise. The value is 0 at program initialization. The last value set is retained even if hatching is not active or is turned on and off.
Fortran: subroutine hatchang(angle) real angle C: vogle_hatchang(angle) float angle; Pascal: procedure HatchAng(angle: real)
Set the distance between hatch lines. The distance is measured in window units (as opposed to viewport or device units).
Fortran: subroutine hatchpitch(pitch) real pitch C: vogle_hatchpitch(pitch) float pitch; Pascal: procedure HatchPitch(pitch: real)
Construct an (x, y) polygon from an array of points provided by the user.
Fortran: subroutine poly2(n, points) integer n real points(2, n) C: vogle_poly2(n, points) int n; float points[][2]; Pascal: procedure Poly2(n: integer; points: Poly2_array_t)
Construct a polygon from an array of points provided by the user.
Fortran: subroutine poly(n, points) integer n real points(3, n) C: vogle_poly(n, points) int n; float points[][3]; Pascal: procedure Poly(n: integer; points: Poly3_array_t)
makepoly opens up a polygon which will then be constructed by a series of move-draws and closed by a closepoly.
Fortran: subroutine makepoly C: vogle_makepoly() Pascal: procedure MakePoly
Terminates a polygon opened by makepoly.
Fortran: subroutine closepoly C: vogle_closepoly() Pascal: procedure ClosePoly
Turns on culling of backfacing polygons. A polygon is backfacing if it's orientation in *screen* coords is clockwise, unless a call to backfacedir is made.
Fortran: subroutine backface(onoff) logical onoff C: vogle_backface(onoff) int onoff; Pascal: procedure BackFace(onoff: boolean)
Sets the backfacing direction to clockwise or anti-clockwise depending on whether clockwise is 1 or 0. 1 = clockwise (in screen coords) 0 = anticlockwise.
Fortran: subroutine backfacedir(clockwise) integer clockwise C: vogle_backfacedir(clockwise) int clockwise; Pascal: procedure BackFaceDir(clockwise: boolean)