**NAME**-
VOGLE - A very ordinary graphics learning environment.
**DESCRIPTION**-
VOGLE is a library of C routines for doing line drawings and
polygon fills in 2 and 3 Dimensions. It handles circles, curves,
arcs, patches, polygons, and software text in a device independent
fashion. Simple hidden line removal is also available via polygon
backfacing. Access to hardware text and double buffering of
drawings depends on the driver. There is also a FORTRAN interface
but as it goes through the C routines FORTRAN users are warned
that arrays are in row-column order in C. A SUN Pascal interface
has also been provided. The following is a brief summary of the
VOGLE subroutines.
**INCLUDE FILES**-
There are two include files provided with vogle: vogle.h and
Vogle.h. The lowercase vogle.h is the C header file which
most vogle C programs would include. The uppercase Vogle.h
is the SUN Pascal header file which contains the
forward/external declarations for Pascal. This header file
should be included just after the program statement of a
Pascal program.

*The following is a brief summary of the VOGLE subroutines.*

Fortran: subroutine vinit(device) character *(*) device C: vinit(device); char *device; Pascal: procedure Vinit(device: string_t) Note 1 :- Current available devices are: tek - tektronix 4010 and compatibles hpgl - HP Graphics language and compatibles dxy - roland DXY plotter language [p]psm or [p]postscript - monochrome PostScript [p]psg - grayscale PostScript [p]psm - color PostScript sun - Sun workstations running sunview pbm or p1 - Poskanzer (pbmplus) ASCII bitmap file p4 - binary pbmplus bitmap file xbm - X11 bitmap file X11 - X windows (SUN's OpenWindows etc etc) next - NeXTStep and other NeXT platforms mif - FrameMaker MIF files decX11 - the decstation window manager apollo - Apollo workstations hercules - IBM PC hercules graphics card cga - IBM PC cga graphics card ega - IBM PC ega graphics card vga - IBM PC vga graphics card sigma - IBM PC sigma graphics card. mswin - IBM PC Microsoft Windows. Sun, X11, decX11, apollo, hercules, cga and ega support double buffering. Note 2 :- If device is a NULL or a null string the value of the environment variable "VDEVICE" is taken as the device type to be opened. Note 3 :- after init it is wise to explicitly clear the screen. e.g.: in C color(BLACK); clear(); or in Fortran call color(BLACK) call clear or in Pascal Color(BLACK); Clear;

Fortran: subroutine vexit C: vexit() Pascal: procedure Vexit;

Fortran: subroutine voutput(path) character*(*) path C: voutput(path) char *path; Pascal: procedure Voutput(path: string_t)

Fortran: subroutine vnewdev(device) character *(*) device C: vnewdev(device) char *device; Pascal: VnewDev(device: string_t)

Fortran: subroutine vgetdev(device) character *(*) device C: char * vgetdev(device) char *device; Pascal: procedure VgetDev(var device: string_t)

Fortran: integer function getdepth() C: int getdepth() Pascal: function GetDepth(): integer;

Some devices are basically window orientated - like sunview and X11. You can give vogle some information on the window that it will use with these routines. These can make your code very device independant. Both routines take arguments which are in device space. (0, 0) is the top left hand corner in device space. To have any effect these routines must be called before vinit. For the X11 device, an entry may be made in your .Xdefaults file of the form

vogl.Geometry =150x500+550+50(where you specify your geometry as you please).

Fortran: subroutine prefposition(x, y) integer x, y C: prefposition(x, y) int x, y; Pascal: procedure PrefPosition(x, y: integer)

Fortran: subroutine prefsize(width, height) integer width, height C: prefsize(width, height) int width, height; Pascal: procedure PrefSize(width, height: integer)

Fortran: subroutine clear C: clear() Pascal: procedure Clear

black = 0 red = 1 green = 2 yellow = 3 blue = 4 magenta = 5 cyan = 6 white = 7.

Fortran: subroutine color(col) integer col C: color(col) int col; Pascal: procedure Color

Fortran: subroutine mapcolor(indx, red, green, blue) integer indx, red, green, blue C: mapcolor(indx, red, green, blue) int indx, red, green, blue; Pascal: procedure MapColor(indx, red, green, blue: integer)rgb values are in the range of 0 to 255.

Fortran: subroutine clipping(onoff) logical onoff C: clipping(onoff) int onoff; Pascal: procedure Clipping(onoff: boolean)

Fortran: integer function getkey C: int getkey() Pascal: function GetKey(): integer;

Fortran: integer function checkkey() C: int checkey() Pascal: function CheckKey(): integer;

Fortran: integer function getstring(bcol, string) integer bcol character *(*) string C: int getstring(bcol, string) int bcol; char *string; Pascal: function GetString(bcol: integer; var string: string_t): integer;

Fortran: integer function locator(xaddr, yaddr) real xaddr, yaddr C: int locator(xaddr, yaddr) float *xaddr, *yaddr; Pascal: function Locator(var xaddr, yaddr: real): integer;

Fortran: integer function slocator(xaddr, yaddr) real xaddr, yaddr C: int slocator(xaddr, yaddr) float *xaddr, *yaddr; Pascal: function Slocator(var xaddr, yaddr: real): integer;

On some devices (particularly X11) considerable speedups in display can be achieved by not flushing each graphics primitive call to the actual display until necessary. VOGL automatically delays flushing in the following cases:

- Within a callobj() call.
- Within curves and patches.
- Within Hershey software text.
- When double buffering (the flush is only done within swapbuffers).

Fortran: subroutine vsetflush(yesno) logical yesno C: void vsetflush(yesno) int yesno; Pascal: procedure VsetFlush(yesno: boolean);

Fortran: subroutine vflush C: void vflush(); Pascal: procedure Vflush;

Fortran: subroutine viewport(left, right, bottom, top) real left, right, bottom, top C: viewport(left, right, bottom, top) float left, right, bottom, top; Pascal: procedure ViewPort(left, right, bottom, top: real);

Fortran: subroutine pushviewport C: pushviewport() Pascal: procedure PushViewPort;

Fortran: subroutine popviewport C: popviewport() Pascal: procedure PopViewPort;

Fortran: subroutine getviewport(left, right, bottom, top) real left, right, bottom, top C: getviewport(left, right, bottom, top) float *left, *right, *bottom, *top; Pascal: procedure GetViewPort(var left, right, bottom, top: real)

Often the screen is not perfectly square and it would be nice to use the extra space without having to turn clipping off. The following routines are provided to get the values needed to adjust the calls to viewport, etc as needed.

Fortran: real function getaspect() C: float getaspect() Pascal: function GetAspect(): real;

Fortran: subroutine getfactors(w, h) real w, h C: getfactors(w, h) float *w, *h; Pascal: procedure GetFactors(var w, h: real)

Fortran: subroutine getdisplaysize(w, h) real w, h C: getdisplaysize(w, h) float *w, *h; Pascal: procedure GetDisplaySize(var w, h: real)

The attribute stack contains details such as current color, filling, hatching, centered, fixedwidth, text height, text width, and the current font. If you need to prevent object calls from changing these, use pushattributes before the call and popattributes after.

Fortran: subroutine pushattributes C: pushattributes() Pascal: procedure PushAttributes;

Fortran: subroutine popattributes C: popattributes() Pascal: procedure PopAttributes;

All the projection routines define a new transformation matrix, and consequently the world units. Parallel projections are defined by ortho or ortho2. Perspective projections can be defined by perspective and window.

Fortran: subroutine ortho(left, right, bottom, top, near_d, far_d) real left, right, bottom, top, near_d, far_d C: ortho(left, right, bottom, top, near_d, far_d) float left, right, bottom, top, near_d, far_d; Pascal: procedure Ortho(left, right, bottom, top, near_d, far_d: real)

Fortran: subroutine ortho2(left, right, bottom, top) real left, right, bottom, top C: ortho2(left, right, bottom, top) float left, right, bottom, top; Pascal: procedure Ortho2(left, right, bottom, top: real)

Fortran: subroutine perspective(fov, aspect, near, far) real fov, aspect, near, far C: perspective(fov, aspect, near, far) float fov, aspect, near, far; Pascal: procedure Perspective(fov, aspect, near, far: real)

Fortran: subroutine window(left, right, bot, top, near, far) real left, right, bot, top, near, far C: window(left, right, bot, top, near, far) float left, right, bot, top, near, far; Pascal: procedure Window(left, right, bot, top, near, far: real)

Fortran: subroutine pushmatrix C: pushmatrix() Pascal: procedure PushMatrix

Fortran: subroutine popmatrix C: popmatrix() Pascal: procedure PopMatrix

Viewpoint routines alter the current tranformation matrix.

Fortran: subroutine polarview(dist, azim, inc, twist) real dist, azim, inc, twist C: polarview(dist, azim, inc, twist) float dist, azim, inc, twist; Pascal: procedure PolarView(dist, azim, inc, twist: real)

Fortran: subroutine up(x, y, z) real x, y, z C: up(x, y, z) float x, y, z; Pascal: procedure Up(x, y, z: real)

Fortran: subroutine lookat(vx, vy, vz, px, py, pz, twist) real vx, vy, vz, px, py, pz, twist C: lookat(vx, vy, vz, px, py, pz, twist) float vx, vy, vz, px, py, pz, twist; Pascal: procedure LookAt(vx, vy, vz, px, py, pz, twist: real)

Fortran: subroutine move(x, y, z) real x, y, z C: move(x, y, z) float x, y, z; Pascal: procedure Move(x, y, z: real)

Fortran: subroutine rmove(deltax, deltay, deltaz) real deltax, deltay, deltaz C: rmove(deltax,deltay) float deltax, deltay, deltaz; Pascal: procedure Rmove(deltax, deltay, deltaz: real)

Fortran: subroutine move2(x, y) real x, y C: move2(x, y) float x, y; Pascal: procedure Move2(x, y: real)

Fortran: subroutine rmove2(deltax, deltay) real deltax, deltay C: rmove2(deltax, deltay) float deltax, deltay; Pascal: procedure Rmove2(deltax, deltay: real)

Fortran: subroutine smove2(x, y) real x, y C: smove2(x, y) float x, y; Pascal: procedure Smove2(x, y: real)

Fortran: subroutine rsmove2(deltax, deltay) real deltax, deltay C: rsmove2(deltax, deltay) float deltax, deltay; Pascal: procedure Rsmove2(deltax, deltay: real)

Fortran: subroutine draw(x, y, z) real x, y, z C: draw(x, y, z) float x, y, z; Pascal: procedure Draw(x, y, z: real)

Fortran: subroutine rdraw(deltax, deltay, deltaz) real deltax, deltay, deltaz C: rdraw(deltax, deltay, deltaz) float deltax, deltay, deltaz; Pascal: procedure Rdraw(deltax, deltay, deltaz: real)

Fortran: subroutine draw2(x, y) real x, y C: draw2(x, y) float x, y; Pascal: procedure Draw2(x, y: real)

Fortran: subroutine rdraw2(deltax, deltay) real deltax, deltay C: rdraw2(deltax, deltay) float deltax, deltay; Pascal: procedure Rdraw2(deltax, deltay: real)

Draw in screen coordinates (-1.0 to 1.0).Fortran: subroutine sdraw2(x, y) real x, y C: sdraw2(x, y) float x, y; Pascal: procedure Sdraw2(x, y: real)

Fortran: subroutine rsdraw2(deltax, deltay) real deltax, deltay C: rsdraw2(deltax, deltay) float deltax, deltay; Pascal: procedure Rsdraw2(deltax, deltay: real)

Fortran: subroutine circleprecision(nsegs) integer nsegs C: circleprecision(nsegs) int nsegs; Pascal: procedure CirclePrecision(nsegs: integer)

Fortran: subroutine arc(x, y, radius, startang, endang) real x, y, radius; real startang, endang; C: arc(x, y, radius, startang, endang) float x, y, radius; float startang, endang; Pascal: procedure Arc(x, y, radius, startang, endang: real)bug: in original vogle, endang - startang must be a positive value. angles are in degrees, positive measured counterclockwise.

Fortran: subroutine sector(x, y, radius, startang, endang) real x, y, radius; real startang, endang; C: sector(x, y, radius, startang, endang) float x, y, radius; float startang, endang; Pascal: procedure Sector(x, y, radius, startang, endang: real)

Fortran: subroutine circle(x, y, radius) real x, y, radius C: circle(x, y, radius) float x, y, radius; Pascal: procedure Circle(x, y, radius: real)

Fortran: subroutine curvebasis(basis) real basis(4,4) C: curvebasis(basis) float basis[4][4]; Pascal: procedure CurveBasis(basis: Matrix44_t)

Fortran: subroutine curveprecision(nsegs) integer nsegs C: curveprecision(nsegs) int nsegs; Pascal: procedure CurvePrecision(nsegs: integer)

Fortran: subroutine rcurve(geom) real geom(4,4) C: rcurve(geom) float geom[4][4]; Pascal: procedure Rcurve(geom: Matrix44_t)

Fortran: subroutine curve(geom) real geom(3,4) C: curve(geom) float geom[4][3]; Pascal: procedure Curve(geom: Matrix43_t)

Fortran: subroutine curven(n, geom) integer n real geom(3,n) C: curven(n, geom) int n; float geom[][3]; Pascal: procedure Curven(n: integer; geom: GeomMat_t)

Fortran: subroutine rect(x1, y1, x2, y2) real x1, y1, x1, y2 C: rect(x1, y1, x2, y2) float x1, y1, x2, y2; Pascal: procedure Rect(x1, y1, x2, y2: real)

Fortran: subroutine polyfill(onoff) logical onoff C: polyfill(onoff) int onoff; Pascal: procedure PolyFill(onoff: boolean)

Fortran: subroutine polyhatch(onoff) logical onoff C: polyhatch(onoff) int onoff; Pascal: procedure PolyHatch(onoff: boolean)

Fortran: subroutine hatchang(angle) real angle C: hatchang(angle) float angle; Pascal: procedure HatchAng(angle: real)

Fortran: subroutine hatchpitch(pitch) real pitch C: hatchpitch(pitch) float pitch; Pascal: procedure HatchPitch(pitch: real)

Fortran: subroutine poly2(n, points) integer n real points(2, n) C: poly2(n, points) int n; float points[][2]; Pascal: procedure Poly2(n: integer; points: Poly2_array_t)

Fortran: subroutine poly(n, points) integer n real points(3, n) C: poly(n, points) int n; float points[][3]; Pascal: procedure Poly(n: integer; points: Poly3_array_t)

Fortran: subroutine makepoly C: makepoly() Pascal: procedure MakePoly

Fortran: subroutine closepoly C: closepoly() Pascal: procedure ClosePoly

Fortran: subroutine backface(onoff) integer onoff C: backface(onoff) int onoff; Pascal: procedure BackFace(onoff: boolean)

Fortran: subroutine backfacedir(clockwise) integer clockwise C: backfacedir(clockwise) int clockwise; Pascal: procedure BackFaceDir(clockwise: boolean)

VOGLE supports hardware and software fonts. The software fonts are based on the character set digitized by Dr Allen V. Hershey while working at the U. S. National Bureau of Standards. Exactly what hardware fonts are supported depends on the device, but it is guaranteed that the names "large" and "small" will result in something readable. For X11 displays the default large and small fonts used by the program can be overridden by placing the following defaults in the ~/.Xdefaults file:

vogle.smallfont: vogle.largefont:It is noted here that text is always assumed to be drawn parallel to the (x, y) plane, using whatever the current z coordinate is. The following software fonts are supported:

astrology cursive cyrillic futura.l futura.m gothic.eng gothic.ger gothic.ita greek markers math.low math.upp meteorology music script symbolic times.g times.i times.ib times.r times.rb japaneseA markers font "markers" is also provided for doing markers - you need to have centertext on for this to give sensible results - with the markers starting at 'A' and 'a'.

If the environment variable "VFONTLIB" is set VOGLE looks for the software fonts in the directory given by this value.

the default font is futura.l

Fortran: subroutine font(fontname) character*(*) fontname C: font(fontname) char *fontname Pascal: procedure Font(fontname: string_t)WHEN ASK FOR NON-EXISTENT FONT, PROGRAM STOPS

Fortran: integer function numchars C: int numchars() Pascal: function NumChars: integer;

Fortran: subroutine textsize(width, height) real width, height C: textsize(width, height) float width, height; Pascal: procedure TextSize(width, height: real)

Fortran: subroutine textang(ang) real ang C: textang(ang) float ang; Pascal: procedure TexTang(ang: real)

The default at program initialization is fixedwidth(.true.)

Fortran: subroutine fixedwidth(onoff) logical onoff C: fixedwidth(onoff) int onoff; Pascal: procedure FixedWidth(onoff: boolean)

Fortran: subroutine centertext(onoff) logical onoff C: centertext(onoff) int onoff; Pascal: procedure CenterText(onoff: boolean)

Fortran: subroutine getcharsize(c, width, height) character*1 c real width, height C: getcharsize(c, width, height) char c; float *width, *height; Pascal: procedure GetCharSize(c: char; var width, height: real)

Fortran: subroutine getfontsize(width, height) real width, height C: getfontsize(width, height) float *width, *height; Pascal: procedure GetFontSize(var width, height: real)

Fortran: subroutine drawchar(c) character c C: drawchar(str) char c; Pascal: procedure DrawChar(c: char)

Fortran: subroutine drawstr(str) character*(*) str C: drawstr(str) char *str; Pascal: procedure DrawStr(str: string_t)

Fortran: real function strlength(str) character*(*) str C: float strlength(str) char *str; Pascal: function StrLength(str: string_t): real;

Fortran: subroutine boxtext(x, y, l, h, s) real x, y, l, h, s C: boxtext(x, y, l, h, s) float x, y, l, h, s; Pascal: procedure BoxText(x, y, l, h: real; s: string_t)

Fortran: subroutine boxfit(l, h, nchars) real l, h integer nchars C: boxfit(l, h, nchars) float l, h int nchars Pascal: procedure BoxFit(l, h: real; nchars: integer)

All transformations are cumulative, so if you rotate something and then do a translate you are translating relative to the rotated axes. If you need to preserve the current transformation matrix use pushmatrix(), do the drawing, and then call popmatrix() to get back where you were before.

Fortran: subroutine translate(x, y, z) real x, y, z C: translate(x, y, z) float x, y, z; Pascal: procedure Translate(x, y, z: real)

Fortran: subroutine scale(x, y, z) real x, y, z C: scale(x, y, z) float x, y, z; Pascal: procedure Scale(x, y, z: real)

Fortran: subroutine rotate(angle, axis) real angle character axis C: rotate(angle, axis) float angle; char axis; Pascal: procedure Rotate(angle: real; axis: char)

Fortran: subroutine patchbasis(tbasis, ubasis) real tbasis(4, 4), ubasis(4, 4) C: patchbasis(tbasis, ubasis) float tbasis[4][4], ubasis[4][4]; Pascal: procedure PatchBasis(tbasis, ubasis: Matrix44_t)

Fortran: subroutine patchprecision(tseg, useg) integer tseg, useg C: patchprecision(tseg, useg) int tseg, useg; Pascal: procedure PatchPrecision(tseg, useg: integer)

Fortran: subroutine patchcurves(nt, nu) integer nt, nu C: patchcurves(nt, nu) int nt, nu; Pascal: procedure PatchCurves(nt, nu: integer)

Fortran: subroutine rpatch(gx, gy, gz, gw) real gx(4,4), gy(4,4), gz(4,4), gw(4,4) C: rpatch(gx, gy, gz, gw) float gx[4][4], gy[4][4], gz[4][4], gw[4][4]; Pascal: procedure Rpatch(gx, gy, gz, gw: Matrix44_t)

Fortran: subroutine patch(gx, gy, gz) real gx(4,4), gy(4,4), gz(4,4) C: patch(gx, gy, gz) float gx[4][4], gy[4][4], gz[4][4]; Pascal: procedure Patch(gx, gy, gz: Matrix44_t)

Fortran: subroutine point(x, y, z) real x, y, z C: point(x, y, z) real x, y, z; Pascal: procedure Point(x, y, z: real)

Fortran: subroutine point2(x, y) real x, y C: point2(x, y) float x, y; Pascal: procedure Point2(x, y: real)

Objects are graphical entities created by the drawing routines called between makeobj and closeobj. Objects may be called from within other objects. When an object is created most of the calculations required by the drawing routines called within it are done up to where the calculations involve the current transformation matrix. So if you need to draw the same thing several times on the screen but in different places it is faster to use objects than to call the appropriate drawing routines each time. Objects also have the advantage of being saveable to a file, from where they can be reloaded for later reuse. Routines which draw or move in screen coordinates, or change device, cannot be included in objects.

Fortran: subroutine makeobj(n) integer n C: makeobj(n) int n; Pascal: procedure MakeObj(n: integer)

Fortran: subroutine closeobj() C: closeobj() Pascal: procedure CloseObj

Fortran: integer function genobj() C: int genobj() Pascal: function GenObj: integer

Fortran: integer function getopenobj() C: int getopenobj() Pascal: function GetOpenObj: integer

Fortran: subroutine callobj(n) integer n C: callobj(n) int n; Pascal: procedure CallObj(n: integer)

Fortran: logical function isobj(n) integer n C: int isobj(n) int n; Pascal: function IsObj(n: integer): boolean;

Fortran: subroutine delobj(n) integer n C: delobj(n) Object n; Pascal: procedure DelObj(n: integer);

Fortran: subroutine loadobj(n, filename) integer n character*(*) filename C: loadobj(n, filename) int n; char *filename; Pascal: procedure LoadObj(n: integer; filename: string_t)

Fortran: saveobj(n, filename) integer n character*(*) filename C: saveobj(n, filename) int n; char *filename; Pascal: procedure SaveObj(n: integer; filename: string_t)

Where possible VOGLE allows for front and back buffers to enable things like animation and smooth updating of the screen. The routine backbuffer is used to initialise double buffering.

Fortran: integer function backbuffer C: backbuffer() Pascal: function BackBuffer:integer

Fortran: subroutine frontbuffer C: frontbuffer() Pascal: procedure FrontBuffer

Fortran: subroutine swapbuffers C: swapbuffers() Pascal: procedure SwapBuffers

Fortran: subroutine getgp(x, y, z) real x, y, z C: getgp(x, y, z) float *x, *y, *z; Pascal: procedure GetGp(var x, y, z: real)

Fortran: subroutine getgp2(x, y) real x, y C: getgp2(x, y) float *x, *y; Pascal: procedure GetGp2(var x, y: real)

Fortran: subroutine sgetgp2(x, y) real x, y C: sgetgp2(x, y) float *x, *y; Pascal: procedure SgetGp2(var x, y: real)

We had to make up the font names based on some books of type faces.

Polygon hatching will give unexpected results unless the polygon is initially defined in the X-Y plane.

Double buffering isn't supported on all devices.

We don't recommend the use of the smove/sdraw routines.

The yobbarays may be turned on or they may be turned off.

Sub-Program Name | Description |
---|---|

Device Routines | |

vinit(device) | Initialise device |

vexit() | Reset window/terminal (must be last routine called) |

voutput(path) | Redirect output from *next* vinit to file |

vnewdev(device) | Reinitialize to use new device without changing |

vgetdev(device) | Get name of current device |

getdepth() | Return number of bit planes (color planes) |

Routines For Setting Up Windows | |

prefposition(x, y) | Specify preferred position of window |

prefsize(width, height) | Specify preferred width and height of window |

General Routines | |

clear() | Clears screen to current colour |

color(col) | Set current colour |

mapcolor(indx, red, green, blue) | Set color map index |

clipping(onoff) | Turn clipping on or off |

getkey() | Return ASCII ordinal of next key typed |

checkkey() | Returns zero if no key is pressed or ASCII ordinal |

getstring(bcol, string) | Read in a string, echoing it in current font |

locator(xaddr, yaddr) | Find out where cursor is |

slocator(xaddr, yaddr) | Find out where cursor is in screen coordinates |

Flushing | |

vsetflush(yesno) | Set global flushing status |

vflush() | Call device flush or syncronisation routine |

Viewport Routines | |

viewport(left, right, bottom, top) | Specify which part of screen to draw in |

pushviewport() | Save current viewport |

popviewport() | Retrieve last viewport |

getviewport(left, right, bottom, top) | Returns limits of current viewport in screen coordinates |

Getting the aspect details | |

getaspect() | Returns the ratio height over width of the display device. |

getfactors(wfact, hfact) | Returns width over min(width of device, height of device) and height over min(width of device, height of device). |

getdisplaysize(w, h) | Returns width and height of device in pixels |

Attribute Stack Routines | |

pushattributes() | Save the current attributes on the attribute stack. |

popattributes() | Restore attributes to what they were at last pushattributes(). |

Projection Routines | |

ortho(left, right, bottom, top, near, far) | Define x,y,z clipping planes. |

ortho2(left, right, bottom, top) | Define x and y clipping planes. |

perspective(fov, aspect, near, far) | Specify perspective viewing pyramid |

window(left, right, bot, top, near, far) | Specify a perspective viewing pyramid |

Matrix Stack Routines | |

pushmatrix() | Save the current transformation matrix on the matrix stack. |

popmatrix() | Reinstall the last matrix pushed |

Viewpoint Routines | |

polarview(dist, azim, inc, twist) | Specify the viewer's position in polar coordinates |

up(x, y, z) | Specify the world up. |

lookat(vx, vy, vz, px, py, pz, twist) | Specify the viewer's position |

Move Routines | |

move(x, y, z) | Move current graphics position to (x, y, z) |

rmove(deltax, deltay, deltaz) | Relative move |

move2(x, y) | Move graphics position to point (x, y) |

rmove2(deltax, deltay) | Relative move in world units. |

smove2(x, y) | Move current graphics position in screen coordinates (-1.0 to 1.0). |

rsmove2(deltax, deltay) | Relative move in screen units (-1.0 to 1.0). |

Drawing Routines | |

draw(x, y, z) | Draw from current graphics position to (x, y, z) |

rdraw(deltax, deltay, deltaz) | Relative draw |

draw2(x, y) | Draw from current graphics position to point (x, y) |

rdraw2(deltax,deltay) | Relative draw |

sdraw2(x, y) | Draw in screen coordinates (-1.0 to 1.0). |

rsdraw2(deltax, deltay) | Relative draw in screen units (-1.0 to 1.0). |

Arcs and Circles | |

circleprecision(nsegs) | Set number of line segments in a circle. Default is 32. |

arc(x, y, radius, startang, endang) | Draw an arc in world units. |

sector(x, y, radius, startang, endang) | Draw a sector. Note: sectors are polygons. |

circle(x, y, radius) | Draw a circle. Note: circles are polygons. |

Curve Routines | |

curvebasis(basis) | Define a basis matrix for a curve. |

curveprecision(nsegs) | Define number of line segments used to draw a curve. |

rcurve(geom) | Draw a rational curve. |

curve(geom) | Draw a curve. |

curven(n, geom) | Draw n - 3 overlapping curve segments. Note: n must be at least 4. |

Rectangles and General Polygon Routines | |

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 points |

poly(n, points) | Construct a polygon from an array of points |

makepoly() | opens polygon constructed by a series of move-draws and closed by closepoly |

closepoly() | Terminates a polygon opened by makepoly. |

backface(onoff) | Turns on culling of backfacing polygons. |

backfacedir(clockwise) | Sets backfacing direction to clockwise or anti-clockwise |

Text Routines | |

font(fontname) | Set the current font |

numchars() | Return number of characters in the current SOFTWARE font. |

textsize(width, height) | Set maximum size of a character in the current SOFTWARE font. |

textang(ang) | Set the SOFTWARE text angle. |

fixedwidth(onoff) | Turns fixedwidth mode on or off for SOFTWARE fonts. |

centertext(onoff) | Turns centertext mode on or off for SOFTWARE fonts. |

getcharsize(c, width, height) | Get the width and height of a character. |

getfontsize(width, height) | Get maximum width and height of a character in a font. |

drawchar(c) | Draw the character c and update current position. |

drawstr(str) | Draw the text in string at the current position. |

strlength(str) | Return the length of the string s |

boxtext(x, y, l, h, s) | Draw the SOFTWARE string s so that it fits in the imaginary box |

boxfit(l, h, nchars) | Set scale for text so that a string of the biggest characters in the SOFTWARE font will fit in a box l by h. l and h are real values. |

Transformations Routines | |

translate(x, y, z) | Set up a translation. |

scale(x, y, z) | Set up scaling factors in x, y, and z axis. |

rotate(angle, axis) | Set up a rotation in axis axis where axis is one of 'x','y', or 'z'. |

Patch Routines | |

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) | Draws a rational patch in the current basis, according to the geometry matrices gx, gy, gz, and gw. |

patch(gx, gy, gz) | Draws a patch in the current basis, according to the geometry matrices gx, gy, and gz. |

Point Routines | |

point(x, y, z) | Draw a point at x, y, z |

point2(x, y) | Draw a point at x, y. |

Object Routines | |

makeobj(n) | Commence the object number n. |

closeobj() | Close the current object. |

genobj() | Returns a unique object identifier. |

getopenobj() | Return the number of the current object. |

callobj(n) | Draw object number n. |

isobj(n) | Returns non-zero if there is an object of number n. |

delobj(n) | Delete the object number n. |

loadobj(n, filename) | Load the object in the file filename a object number n. |

saveobj(n, filename) | Save object number n into file filename. Does NOT save objects called inside object n. |

Double Buffering | |

backbuffer() | Make VOGLE draw in the backbuffer. Returns -1 if the device is not up to it. |

frontbuffer() | Make VOGLE draw in the front buffer. This will always work. |

swapbuffers() | Swap the front and back buffers. |

Position Routines | |

getgp(x, y, z) | Gets the current graphics position |

getgp2(x, y) | Gets the current graphics position |

sgetgp2(x, y) | Gets the current screen graphics position in screen coords (-1 to 1) |