home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / avogl.tar.gz / avogl.tar / vogl / docs / vogl.doc < prev   
Text File  |  1992-09-22  |  51KB  |  2,047 lines

  1.  
  2.  
  3.  
  4. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  5.  
  6.  
  7.  
  8. NAME
  9.      VOGL - A very ordinary GL Library.
  10.  
  11.  
  12. DESCRIPTION
  13.      VOGL is a library of C routines which try to  allow  a  pro-
  14.      grammer  to  write  programs  which can be moved to machines
  15.      which have the Silicon Graphics GL library on  them.  It  is
  16.      based  entirely  on  the  VOGLE  graphics  library, and as a
  17.      result  can  handle  circles,  curves,  arcs,  patches,  and
  18.      polygons in a device independent fashion. Simple hidden line
  19.      removal is also available via polygon backfacing. Access  to
  20.      hardware  text  and  double buffering of drawings depends on
  21.      the driver.  There is also a FORTRAN  interface  but  as  it
  22.      goes  through  the  C routines FORTRAN users are warned that
  23.      arrays are in row-column order in C. Both the  long  FORTRAN
  24.      names  and  the shortened six character names are supported.
  25.      People interested in using  software  text  should  see  the
  26.      hershey library, HERSHEY(3).
  27.  
  28.      Some routines are only available in  VOGL.  If  you  include
  29.      them  in  programs  it  is  advisable to put #ifdef VOGL ...
  30.      #endif around them. The constant VOGL is defined whenever  a
  31.      VOGL header file is included.
  32.  
  33.      It should be noted that there are a number of routines  that
  34.      take the type Angle for some of their parameters. All angles
  35.      specified this way are actually Integer Tenths  Of  Degrees.
  36.      (Don't ask!)
  37.  
  38.  
  39.   Include files.
  40.      There are two include files provided with vogl:  vogl.h  and
  41.      vodevice.h.   The  file  vogl.h has the type definitions and
  42.      function interfaces, ideally it is included where you  would
  43.      include  gl.h on an SGI. The file vodevice.h has the devices
  44.      in it, and it is included where you would  include  device.h
  45.      on an SGI.
  46.  
  47.  
  48.      The following is a brief summary of the VOGL subroutines.
  49.  
  50.   Device routines.
  51.      vinit(device)
  52.           Tell VOGL what the device is. This routine needs to  be
  53.           called  if  the environment variable VDEVICE isn't set,
  54.           or if the value in VDEVICE is not to be used.
  55.  
  56.                Fortran:
  57.                     subroutine vinit(device, len)
  58.                     character *(*) device
  59.                     integer len
  60.  
  61.  
  62.  
  63. VOGL 1.0            Last change: 6 June 1991                    1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  71.  
  72.  
  73.  
  74.                C:
  75.                     vinit(device);
  76.                     char     *device;
  77.  
  78.                Note 1 :- Current available devices are:
  79.                         tek - tektronix 4010 and compatibles
  80.                         hpgl - HP Graphics language and compatibles
  81.                         dxy - roland DXY plotter language
  82.                         postscript - postscript devices
  83.                         ppostscript - postscript devices (portrait mode)
  84.                         sun - Sun workstations running sunview
  85.                         X11 - X windows (SUN's Openwindows etc etc)
  86.                         decX11 - the decstation window manager
  87.                         apollo - Apollo workstations
  88.                         hercules - IBM PC hercules graphics card
  89.                         cga - IBM PC cga graphics card
  90.                         ega - IBM PC ega graphics card
  91.                         vga - IBM PC vga graphics card
  92.                         sigma - IBM PC sigma graphics card.
  93.  
  94.                         Sun, X11, decX11, apollo, hercules, cga
  95.                         and ega support double buffering.
  96.  
  97.  
  98.                Note 2 :- If device is a NULL or a null string the value
  99.                     of the environment variable "VDEVICE" is taken as the
  100.                     device type to be opened.
  101.  
  102.                Note 3 :- after init it is wise to explicitly
  103.                     clear the screen.
  104.  
  105.                e.g.: in C
  106.                     color(BLACK);
  107.                     clear();
  108.  
  109.                or    in Fortran
  110.                     call color(BLACK)
  111.                     call clear
  112.  
  113.  
  114.      ginit()
  115.           Open the graphics device and do the  basic  initialisa-
  116.           tion. This routine is marked for obsolescence. The rou-
  117.           tine winopen (see below) should be used instead.
  118.  
  119.                Fortran:
  120.                     subroutine ginit
  121.  
  122.                C:
  123.                     ginit()
  124.  
  125.  
  126.  
  127.  
  128.  
  129. VOGL 1.0            Last change: 6 June 1991                    2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  137.  
  138.  
  139.  
  140.      winopen(title)
  141.           Open the graphics device and do the  basic  initialisa-
  142.           tion. This routine should be used instead of ginit.
  143.  
  144.                Fortran:
  145.                     subroutine winopen(title, len)
  146.                     character*(*) title
  147.                     integer len
  148.  
  149.                C:
  150.                     winopen(title)
  151.                          char *title;
  152.  
  153.  
  154.      gexit()
  155.           Reset the window/terminal (must be the last  VOGL  rou-
  156.           tine called)
  157.  
  158.                Fortran:
  159.                     subroutine gexit
  160.  
  161.                C:
  162.                     gexit()
  163.  
  164.  
  165.      voutput(path)
  166.           Redirect output from *next*  ginit  to  file  given  by
  167.           path. This routine only applies to devices drivers that
  168.           write to stdout e.g. postscript and hpgl.
  169.  
  170.                Fortran:
  171.                     subroutine voutput(path, len)
  172.                     character*(*) path
  173.                     integer len
  174.  
  175.                C:
  176.                     voutput(path)
  177.                          char *path;
  178.  
  179.  
  180.      vnewdev(device)
  181.           Reinitialize VOGL to use a new device without  changing
  182.           attributes,  viewport  etc.   (eg.  window and viewport
  183.           specifications)
  184.  
  185.                Fortran:
  186.                     subroutine vnewdev(device, len)
  187.                     character *(*) device
  188.                     integer len
  189.  
  190.                C:
  191.                     vnewdev(device)
  192.  
  193.  
  194.  
  195. VOGL 1.0            Last change: 6 June 1991                    3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  203.  
  204.  
  205.  
  206.                          char *device;
  207.  
  208.           getplanes() Returns the number of bit planes (or  color
  209.           planes)  for  a particular device. The number of colors
  210.           displayable by the device is then 2**(nplanes-1)
  211.  
  212.                Fortran:
  213.                     integer function  getplanes()
  214.  
  215.                C:
  216.                     long
  217.                     getplanes()
  218.  
  219.  
  220.   Routines For Setting Up Windows.
  221.      Some devices are basically window orientated - like  sunview
  222.      and X11. You can give VOGL some information about the window
  223.      that it will use with these routines.  These can  make  your
  224.      code  very  device independent. Both routines take arguments
  225.      which are in device space. (0, 0) is the  bottom  left  hand
  226.      corner  in  device  space. To have any effect these routines
  227.      must be called before ginit or winopen.
  228.  
  229.      prefposition(x1, y1, x2, y2)
  230.           Specify the preferred position of the window opened  by
  231.           the *next* winopen.
  232.  
  233.                Fortran:
  234.                     subroutine prefposition(x1, y1, x2, y2)
  235.                     integer x1, y1, x2, y2
  236.  
  237.                C:
  238.                     prefposition(x1, y1, x2, y2)
  239.                          long x1, y1, x2, y2
  240.  
  241.  
  242.      prefsize(width, height)
  243.           Specify the preferred width and height  of  the  window
  244.           opened by the *next* winopen.
  245.  
  246.                Fortran:
  247.                     subroutine prefsize(width, height)
  248.                     integer width, height
  249.  
  250.                C:
  251.                     prefsize(width, height)
  252.                          long width, height;
  253.  
  254.  
  255.      reshapeviewport
  256.           This is occasionally used in Iris GL if a REDRAW  event
  257.           rolls  up.  While  VOGL  is  unlikely to ever provide a
  258.  
  259.  
  260.  
  261. VOGL 1.0            Last change: 6 June 1991                    4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  269.  
  270.  
  271.  
  272.           REDRAW event the call is provided for compatibility.
  273.  
  274.                Fortran:
  275.                     subroutine reshap
  276.  
  277.                C:
  278.                     reshapeviewport()
  279.  
  280.  
  281.   General Routines.
  282.      clear()
  283.           Clears the current viewport to the current colour.
  284.  
  285.                Fortran:
  286.                     subroutine clear
  287.  
  288.                C:
  289.                     clear()
  290.  
  291.  
  292.      color(col)
  293.           Set the current colour. The  standard  colours  are  as
  294.           follows:
  295.                black = 0       red = 1         green = 2       yellow = 3
  296.                blue = 4        magenta = 5     cyan = 6        white = 7.
  297.  
  298.                These are included in vogl.h as:
  299.  
  300.                   BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN and WHITE.
  301.  
  302.                When using fortran these are included in fvogl.h as
  303.                   BLACK, RED, GREEN, YELLOW, BLUE, MAGENT, CYAN and WHITE.
  304.  
  305.                Fortran:
  306.                     subroutine color(col)
  307.                     integer col
  308.  
  309.                C:
  310.                     color(col)
  311.                          Colorindex     col;
  312.  
  313.  
  314.      colorf(col)
  315.           Same as color only it takes a floating point  argument.
  316.           In  Iris  GL there are sometimes good reasons for using
  317.           this routine over color. See the  GL  manual  for  more
  318.           details.
  319.  
  320.                Fortran:
  321.                     subroutine colorf(col)
  322.                     real col
  323.  
  324.  
  325.  
  326.  
  327. VOGL 1.0            Last change: 6 June 1991                    5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  335.  
  336.  
  337.  
  338.                C:
  339.                     colorf(col)
  340.                          float     col;
  341.  
  342.  
  343.      mapcolor(indx, red, green, blue)
  344.           Set the color map index indx to the  color  represented
  345.           by  (red, green, blue).  If the device has no color map
  346.           this call does nothing.
  347.  
  348.                Fortran:
  349.                     subroutine mapcolor(indx, red, green, blue)
  350.                     integer indx, red, green, blue
  351.  
  352.                C:
  353.                     mapcolor(indx, red, green, blue)
  354.                          Colorindex     indx;
  355.                          short          red, green, blue;
  356.  
  357.  
  358.      defbasis(id, mat)
  359.           Define basis number id to be the matrix mat.
  360.  
  361.                Fortran:
  362.                     subroutine defbasis(id, mat)
  363.                     integer id
  364.                     real mat(4, 4)
  365.  
  366.                C:
  367.                     defbasis(id, mat)
  368.                          short     id;
  369.                          Matrix    mat;
  370.  
  371.  
  372.      polymode(mode)
  373.           NOTE:- For this call to have any effect  it  must  have
  374.           been  conditionally  compilied  into  the library. (See
  375.           polygons.c  for  details)  Control   the   filling   of
  376.           polygons.  It  expects  one  of the following PYM_LINE,
  377.           which means only the edges of the polygon will be drawn
  378.           and   PYM_FILL   which  means  fill  the  polygon  (the
  379.           default). PYM_POINT and PYM_HOLLOW are also  recognised
  380.           but they don't behave quite as they would with SGI GL.
  381.  
  382.           Also note that in Fortran the  corresponding  constants
  383.           are  truncated  to  PYM_LI,  PYM_FI,  PYM_PO and PYM_HO
  384.           respectivly. These appear in fvogl.h.
  385.  
  386.  
  387.                Fortran:
  388.                     subroutine polymode(mode)
  389.                     integer mode
  390.  
  391.  
  392.  
  393. VOGL 1.0            Last change: 6 June 1991                    6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  401.  
  402.  
  403.  
  404.                C:
  405.                     polymode(mode)
  406.                          long mode;
  407.  
  408.  
  409.   The Device Queue and Valuator Routines.
  410.      The available  devices  are  defined  in  the  header  files
  411.      vodevice.h and for FORTRAN fvodevice.h
  412.  
  413.      qdevice(dev)
  414.           Enable a device. Note: in VOGL the queue is  of  length
  415.           1.
  416.  
  417.                Fortran:
  418.                     subroutine qdevice(dev)
  419.                     integer dev
  420.  
  421.                C:
  422.                     qdevice(dev)
  423.                          Device    dev;
  424.  
  425.  
  426.      unqdevice(dev)
  427.           Disable a device.
  428.  
  429.                Fortran:
  430.                     subroutine qdevice(dev)
  431.                     integer dev
  432.  
  433.                C:
  434.                     qdevice(dev)
  435.                          Device    dev;
  436.  
  437.  
  438.      qread(data)
  439.           Read an event from  the  device  queue.  This  routines
  440.           blocks  until  something happens. Note: it is important
  441.           to have called qdevice before doing this.
  442.  
  443.                Fortran:
  444.                     integer function qread(data)
  445.                     integer*2 data
  446.  
  447.                C:
  448.                     long qread(data)
  449.                          short     *data;
  450.  
  451.  
  452.      isqueued(dev)
  453.           Check to see if device dev is enabled for queueing.
  454.  
  455.                Fortran:
  456.  
  457.  
  458.  
  459. VOGL 1.0            Last change: 6 June 1991                    7
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  467.  
  468.  
  469.  
  470.                     logical function isqueued(dev)
  471.                     integer dev
  472.  
  473.                C:
  474.                     Boolean isqueued(dev)
  475.                          short     *dev;
  476.  
  477.  
  478.      qtest()
  479.           Check if there is anything in the queue. Note: in  VOGL
  480.           the queue is only 1 entry deep.
  481.  
  482.                Fortran:
  483.                     logical function qtest
  484.  
  485.                C:
  486.                     Boolean qtest()
  487.  
  488.  
  489.      qreset()
  490.           Reset the device queue. This will get rid of any  pend-
  491.           ing events.
  492.  
  493.                Fortran:
  494.                     subroutine qreset
  495.  
  496.                C:
  497.                     qreset()
  498.  
  499.  
  500.      getbutton(dev)
  501.           Returns the up (0) or down (1) state of a button.
  502.  
  503.                Fortran:
  504.                     logical function getbutton(dev)
  505.                     integer dev
  506.  
  507.                C:
  508.                     Boolean getbutton(dev)
  509.                          Device    dev;
  510.  
  511.  
  512.      getvaluator(dev)
  513.           Return the current value of the valuator. Currently the
  514.           only valuators supported are MOUSEX and MOUSEY.
  515.  
  516.                Fortran:
  517.                     integer function getvaluator(dev)
  518.                     integer dev
  519.  
  520.                C:
  521.                     long getvaluator(dev)
  522.  
  523.  
  524.  
  525. VOGL 1.0            Last change: 6 June 1991                    8
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  533.  
  534.  
  535.  
  536.                          Device    dev;
  537.  
  538.  
  539.   Viewport Routines.
  540.      viewport(left, right, bottom, top)
  541.           Specify which part of the  screen  to  draw  in.  Left,
  542.           right,  bottom,  and  top  are integer values in screen
  543.           coordinates.
  544.  
  545.                Fortran:
  546.                     subroutine viewport(left, right, bottom, top)
  547.                     integer left, right, bottom, top
  548.  
  549.                C:
  550.                     viewport(left, right, bottom, top)
  551.                          Screencoord      left, right, bottom, top;
  552.  
  553.  
  554.      pushviewport()
  555.           Save current viewport on the viewport stack.
  556.  
  557.                Fortran:
  558.                     subroutine pushviewport
  559.  
  560.                C:
  561.                     pushviewport()
  562.  
  563.  
  564.      popviewport()
  565.           Retrieve last pushed viewport.
  566.  
  567.                Fortran:
  568.                     subroutine popviewport
  569.  
  570.                C:
  571.                     popviewport()
  572.  
  573.  
  574.      getviewport(left, right, bottom, top)
  575.           Returns the left, right, bottom and top limits  of  the
  576.           current viewport in screen coordinates.
  577.  
  578.                Fortran:
  579.                     subroutine getviewport(left, right, bottom, top)
  580.                     integer*2 left, right, bottom, top
  581.  
  582.                C:
  583.                     getviewport(left, right, bottom, top)
  584.                          Screencoord      *left, *right, *bottom, *top;
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591. VOGL 1.0            Last change: 6 June 1991                    9
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  599.  
  600.  
  601.  
  602.   Attribute Stack Routines.
  603.      The attribute stack contains details such as current  color,
  604.      and  the  current font number. If you need to prevent object
  605.      calls form changing these,  use  pushattributes  before  the
  606.      call and popattributes after.
  607.  
  608.      pushattributes()
  609.           Save the current attributes on the attribute stack.
  610.  
  611.                Fortran:
  612.                     subroutine pushattributes
  613.  
  614.                C:
  615.                     pushattributes()
  616.  
  617.      popattributes()
  618.           Restore the attributes to what they were  at  the  last
  619.           pushattribute().
  620.  
  621.                Fortran:
  622.                     subroutine popattributes
  623.  
  624.                C:
  625.                     popattributes()
  626.  
  627.  
  628.   Projection Routines.
  629.      All the projection  routines  define  a  new  transformation
  630.      matrix,  and  consequently the world units. Parallel projec-
  631.      tions are defined by ortho or  ortho2.  Perspective  projec-
  632.      tions  can  be  defined by perspective and window.  Note the
  633.      types Angle, etc, are defined in vogl.h. Remember angles are
  634.      in tenths of degrees.
  635.  
  636.      ortho(left, right, bottom, top, near, far)
  637.           Define x (left, right), y (bottom, top), and  z  (near,
  638.           far)  clipping planes. The near and far clipping planes
  639.           are actually specified as distances along the  line  of
  640.           sight.  These  distances  can  also  be  negative.  The
  641.           actual location of the clipping planes is z  =  -near_d
  642.           and z = -far_d.
  643.  
  644.                Fortran:
  645.                     subroutine ortho(left, right, bottom, top, near_d, far_d)
  646.                     real left, right, bottom, top, near_d, far_d
  647.  
  648.                C:
  649.                     ortho(left, right, bottom, top, near_d, far_d)
  650.                          Coord     left, right, bottom, top, near_d, far_d;
  651.  
  652.  
  653.      ortho2(left, right, bottom, top)
  654.  
  655.  
  656.  
  657. VOGL 1.0            Last change: 6 June 1991                   10
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  665.  
  666.  
  667.  
  668.           Define x (left, right), and y  (bottom,  top)  clipping
  669.           planes.
  670.  
  671.                Fortran:
  672.                     subroutine ortho2(left, right, bottom, top)
  673.                     real left, right, bottom, top
  674.  
  675.                C:
  676.                     ortho2(left, right, bottom, top)
  677.                          float     left, right, bottom, top;
  678.  
  679.  
  680.      perspective(fov, aspect, near, far)
  681.           Specify a perspective viewing pyramid in world  coordi-
  682.           nates  by  giving a field of view, aspect ratio and the
  683.           distance from the eye of  the  near  and  far  clipping
  684.           plane.
  685.  
  686.                Fortran:
  687.                     subroutine perspective(fov, aspect, near, far)
  688.                     integer fov
  689.                     real aspect, near, far
  690.  
  691.                C:
  692.                     perspective(fov, aspect, near, far)
  693.                          Angle     fov;
  694.                          float     aspect;
  695.                          Coord     near, far;
  696.  
  697.  
  698.      window(left, right, bot, top, near, far)
  699.           Specify a perspective viewing pyramid in world coordinates by
  700.           giving the rectangle closest to the eye (ie. at the near clipping
  701.           plane) and the distances to the near and far clipping planes.
  702.  
  703.                Fortran:
  704.                     subroutine window(left, right, bot, top, near, far)
  705.                     real left, right, bot, top, near, far
  706.  
  707.                C:
  708.                     window(left, right, bot, top, near, far)
  709.                          float     left, right, bot, top, near, far;
  710.  
  711.  
  712.   Matrix Stack Routines.
  713.      pushmatrix()
  714.           Save the current transformation matrix  on  the  matrix
  715.           stack.
  716.  
  717.                Fortran:
  718.                     subroutine pushmatrix
  719.  
  720.  
  721.  
  722.  
  723. VOGL 1.0            Last change: 6 June 1991                   11
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  731.  
  732.  
  733.  
  734.                C:
  735.                     pushmatrix()
  736.  
  737.  
  738.      popmatrix()
  739.           Retrieve the last matrix pushed and make it the current
  740.           transformation matrix.
  741.  
  742.                Fortran:
  743.                     subroutine popmatrix
  744.  
  745.                C:
  746.                     popmatrix()
  747.  
  748.  
  749.   Viewpoint Routines.
  750.      Viewpoint routines alter the current tranformation matrix.
  751.  
  752.      polarview(dist, azim, inc, twist)
  753.           Specify the viewer's position in polar  coordinates  by
  754.           giving  the  distance  from  the viewpoint to the world
  755.           origin, the azimuthal angle in the x-y plane,  measured
  756.           from  the y-axis, the incidence angle in the y-z plane,
  757.           measured from the z-axis, and the twist angle about the
  758.           line of sight.
  759.  
  760.                Fortran:
  761.                     subroutine polarview(dist, azim, inc, twist)
  762.                     real dist
  763.                     integer azim, inc, twist
  764.  
  765.                C:
  766.                     polarview(dist, azim, inc, twist)
  767.                          Coord     dist;
  768.                          Angle     azim, inc, twist;
  769.  
  770.  
  771.      lookat(vx, vy, vz, px, py, pz, twist)
  772.           Specify the viewer's position by giving a viewpoint and
  773.           a  reference  point in world coordinates. A twist about
  774.           the line of sight may also be given.
  775.  
  776.                Fortran:
  777.                     subroutine lookat(vx, vy, vz, px, py, pz, twist)
  778.                     real vx, vy, vz, px, py, pz
  779.                     integer twist
  780.  
  781.                C:
  782.                     lookat(vx, vy, vz, px, py, pz, twist)
  783.                          float     vx, vy, vz, px, py, pz;
  784.                          Angle     twist;
  785.  
  786.  
  787.  
  788.  
  789. VOGL 1.0            Last change: 6 June 1991                   12
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  797.  
  798.  
  799.  
  800.   Move Routines.
  801.      There are variations on all these routines that end  in  's'
  802.      and  also end in 'i'. In the case of the 's' variations they
  803.      take arguments of type Scoord in C and integer*2 in FORTRAN.
  804.      In  the  case  of  the 'i' variations they take arguments of
  805.      type Icoord in C and integer in FORTRAN.
  806.  
  807.      move(x, y, z)
  808.           Move current graphics position to (x, y, z). (x, y,  z)
  809.           is a point in world coordinates.
  810.  
  811.                Fortran:
  812.                     subroutine move(x, y, z)
  813.                     real x, y, z
  814.  
  815.                C:
  816.                     move(x, y, z)
  817.                          Coord     x, y, z;
  818.  
  819.  
  820.      rmv(deltax, deltay, deltaz)
  821.           Relative move. deltax, deltay, and deltaz  are  offsets
  822.           in world units.
  823.  
  824.                Fortran:
  825.                     subroutine rmv(deltax, deltay, deltaz)
  826.                     real deltax, deltay, deltaz
  827.  
  828.                C:
  829.                     rmv(deltax, deltay, deltaz)
  830.                          Coord   deltax, deltay, deltaz;
  831.  
  832.  
  833.      move2(x, y)
  834.           Move graphics position to point (x, y).  (x,  y)  is  a
  835.           point in world coordinates.
  836.  
  837.                Fortran:
  838.                     subroutine move2(x, y)
  839.                     real x, y
  840.  
  841.                C:
  842.                     move2(x, y)
  843.                          Coord     x, y;
  844.  
  845.  
  846.      rmv2(deltax, deltay)
  847.           Relative move2. deltax and deltay are offsets in  world
  848.           units.
  849.  
  850.                Fortran:
  851.                     subroutine rmv2(deltax, deltay)
  852.  
  853.  
  854.  
  855. VOGL 1.0            Last change: 6 June 1991                   13
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  863.  
  864.  
  865.  
  866.                     real deltax, deltay
  867.  
  868.                C:
  869.                     rmv2(deltax, deltay)
  870.                          Coord     deltax, deltay;
  871.  
  872.  
  873.   Drawing Routines.
  874.      There are variations on all these routines that end  in  's'
  875.      and  also end in 'i'. In the case of the 's' variations they
  876.      take arguments of type Scoord in C and integer*2 in FORTRAN.
  877.      In  the  case  of  the 'i' variations they take arguments of
  878.      type Icoord in C and integer in FORTRAN.
  879.  
  880.      draw(x, y, z)
  881.           Draw from current graphics position to (x, y,  z).  (x,
  882.           y, z) is a point in world coordinates.
  883.  
  884.                Fortran:
  885.                     subroutine draw(x, y, z)
  886.                     real x, y, z
  887.  
  888.                C:
  889.                     draw(x, y, z)
  890.                          Coord     x, y, z;
  891.  
  892.  
  893.      rdr(deltax, deltay, deltaz)
  894.           Relative draw. deltax, deltay, and deltaz  are  offsets
  895.           in world units.
  896.  
  897.                Fortran:
  898.                     subroutine rdr(deltax, deltay, deltaz)
  899.                     real deltax, deltay, deltaz
  900.  
  901.                C:
  902.                     rdr(deltax, deltay, deltaz)
  903.                          Coord   deltax, deltay, deltaz;
  904.  
  905.  
  906.      draw2(x, y)
  907.           Draw from current graphics position to  point  (x,  y).
  908.           (x, y) is a point in world coordinates.
  909.  
  910.                Fortran:
  911.                     subroutine draw2(x, y)
  912.                     real x, y
  913.  
  914.                C:
  915.                     draw2(x, y)
  916.                          Coord     x, y;
  917.  
  918.  
  919.  
  920.  
  921. VOGL 1.0            Last change: 6 June 1991                   14
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  929.  
  930.  
  931.  
  932.      rdr2(deltax, deltay)
  933.           Relative draw2. deltax and deltay are offsets in  world
  934.           units.
  935.  
  936.                Fortran:
  937.                     subroutine rdr2(deltax, deltay)
  938.                     real deltax, deltay
  939.  
  940.                C:
  941.                     rdr2(deltax, deltay)
  942.                          Coord   deltax, deltay;
  943.  
  944.  
  945.  
  946.   Vertex calls.
  947.      There are calls which we term 'vertex  calls'  which  simply
  948.      specify  a  point in 4D, 3D or 2D. These calls take an array
  949.      which specifies the coordinates of the point. The  interpre-
  950.      tation of these points is described below.
  951.  
  952.      v4d(v) Specify a vertex(point) in 4D using double  precision
  953.      numbers.
  954.  
  955.           Fortran:
  956.                subroutine v4d(v)
  957.                real *8 v(4)
  958.  
  959.           C:
  960.                v4d(v)
  961.                     double v[4];
  962.  
  963.  
  964.      v4f(v) Specify a vertex(point) in 4D using single  precision
  965.      floating point numbers.
  966.  
  967.           Fortran:
  968.                subroutine v4f(v)
  969.                real v(4)
  970.  
  971.           C:
  972.                v4f(v)
  973.                     float v[4];
  974.  
  975.  
  976.      v4i(v) Specify a vertex(point) in 4D using integer numbers
  977.  
  978.           Fortran:
  979.                subroutine v4i(v)
  980.                integer v(4)
  981.  
  982.           C:
  983.                v4i(v)
  984.  
  985.  
  986.  
  987. VOGL 1.0            Last change: 6 June 1991                   15
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  995.  
  996.  
  997.  
  998.                     long v[4];
  999.  
  1000.  
  1001.      v4s(v) Specify a vertex(point) in  4D  using  short  integer
  1002.      numbers
  1003.  
  1004.           Fortran:
  1005.                subroutine v4s(v)
  1006.                integer *2  v(4)
  1007.  
  1008.           C:
  1009.                v4s(v)
  1010.                     short v[4];
  1011.  
  1012.  
  1013.  
  1014.  
  1015.      There are also equivalent calls for  3D  points  (v3d,  v3f,
  1016.      v3i,  v3s)  and  2D  points  (v2d,  v2f, v2i, v2s). The only
  1017.      difference is the number of elements that each vertex  needs
  1018.      to  be  specified. It should also be noted the the different
  1019.      data types (ie. double, float, long and  short)  are  merely
  1020.      different  ways  of  representing  the same basic coordinate
  1021.      data (calling v3s with v[] = {100,200,200} is  the  same  as
  1022.      calling v3f with v[] = {100.0, 200.0, 200.0}).
  1023.  
  1024.      The way these points are interpreted depends  on  what  mode
  1025.      has  be  set  up  with  one  of the calls bgnpoint, bgnline,
  1026.      bgnclosedline or bgnpolygon.  The  bgnpoint  call  specifies
  1027.      that  the next series of vertex calls are specifying a chain
  1028.      of points (dots) to be drawn. A bgnpoint is terminated  with
  1029.      a endpoint call.
  1030.  
  1031.           Fortran:
  1032.                subroutine bgnpoint
  1033.  
  1034.           C:
  1035.                bgnpoint()
  1036.  
  1037.           Fortran:
  1038.                subroutine endpoint
  1039.  
  1040.           C:
  1041.                endpoint()
  1042.  
  1043.  
  1044.  
  1045.      The bgnline call specifies that the next  series  of  vertex
  1046.      calls are specifying the points on a polyline. A bgnline
  1047.       is terminated with a endline call.
  1048.  
  1049.           Fortran:
  1050.  
  1051.  
  1052.  
  1053. VOGL 1.0            Last change: 6 June 1991                   16
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1061.  
  1062.  
  1063.  
  1064.                subroutine bgnline
  1065.  
  1066.           C:
  1067.                bgnline()
  1068.  
  1069.           Fortran:
  1070.                subroutine endline
  1071.  
  1072.           C:
  1073.                endline()
  1074.  
  1075.  
  1076.  
  1077.      The bgnclosedline call is similar to the bgnline except that
  1078.      when  endclosedline is called the first point given (ie. the
  1079.      one first after the bgnclosedline call)  is  joined  to  the
  1080.      last  point given (ie. the one just before the endclosedline
  1081.      call).
  1082.  
  1083.           Fortran:
  1084.                subroutine bgncloseline
  1085.  
  1086.           C:
  1087.                bgnclosedline()
  1088.  
  1089.           Fortran:
  1090.                subroutine endclosedline
  1091.  
  1092.           C:
  1093.                endclosedline()
  1094.  
  1095.  
  1096.  
  1097.      The bgnpolygon call specifies that the next series of vertex
  1098.      calls  are  defining  a polygon.  When endpolygon is called,
  1099.      the polygon is closed and filled (or  drawn  as  an  outline
  1100.      depending  on  the  mode that has been set with the polymode
  1101.      call if this call has been compilied into the library.
  1102.  
  1103.  
  1104.           Fortran:
  1105.                subroutine bgnpolygon
  1106.  
  1107.           C:
  1108.                bgnpolygon()
  1109.  
  1110.           Fortran:
  1111.                subroutine endpolygon
  1112.  
  1113.           C:
  1114.                endpolygon()
  1115.  
  1116.  
  1117.  
  1118.  
  1119. VOGL 1.0            Last change: 6 June 1991                   17
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1127.  
  1128.  
  1129.  
  1130.   Arcs and Circles.
  1131.      There are variations on all these routines that end  in  's'
  1132.      and  also end in 'i'. In the case of the 's' variations they
  1133.      take arguments of type Scoord in C and integer*2 in FORTRAN.
  1134.      In  the  case  of  the 'i' variations they take arguments of
  1135.      type Icoord in C and integer in FORTRAN.
  1136.  
  1137.      circleprecision(nsegs)
  1138.           Set the number of line segments  making  up  a  circle.
  1139.           Default  is  currently 32. The number of segments in an
  1140.           arc is calculated from nsegs according the span of  the
  1141.           arc.  This routine is only available in VOGL.
  1142.                Fortran:
  1143.                     subroutine circleprecision(nsegs)
  1144.                     integer   nsegs
  1145.                C:
  1146.                     circleprecision(nsegs)
  1147.                          int  nsegs;
  1148.  
  1149.  
  1150.      arc(x, y, radius, startang, endang)
  1151.           Draw an arc. x, y,  and  radius  are  values  in  world
  1152.           units.
  1153.  
  1154.                Fortran:
  1155.                     subroutine arc(x, y, radius, startang, endang)
  1156.                     real x, y, radius;
  1157.                     integer startang, endang;
  1158.                C:
  1159.                     arc(x, y, radius, startang, endang)
  1160.                          Coord  x, y, radius;
  1161.                          Angle  startang, endang;
  1162.  
  1163.  
  1164.      arcf(x, y, radius, startang, endang)
  1165.           Draw a filled arc. x, y, and radius are values in world
  1166.           units.  (How the filling is done may be changed by cal-
  1167.           ling polymode , if this call has  been  compilied  into
  1168.           the library).
  1169.  
  1170.                Fortran:
  1171.                     subroutine arcf(x, y, radius, startang, endang)
  1172.                     real x, y, radius;
  1173.                     integer startang, endang;
  1174.                C:
  1175.                     arcf(x, y, radius, startang, endang)
  1176.                          Coord  x, y, radius;
  1177.                          Angle  startang, endang;
  1178.  
  1179.  
  1180.      circ(x, y, radius)
  1181.           Draw a circle. x, y, and radius  are  values  in  world
  1182.  
  1183.  
  1184.  
  1185. VOGL 1.0            Last change: 6 June 1991                   18
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1193.  
  1194.  
  1195.  
  1196.           units.
  1197.  
  1198.                Fortran:
  1199.                     subroutine circ(x, y, radius)
  1200.                     real x, y, radius
  1201.                C:
  1202.                     circ(x, y, radius)
  1203.                          Coord     x, y, radius;
  1204.  
  1205.  
  1206.      circf(x, y, radius)
  1207.           Draw a filled circle. x, y, and radius  are  values  in
  1208.           world units.  How the filling is done may be changed by
  1209.           calling polymode.
  1210.  
  1211.                Fortran:
  1212.                     subroutine circf(x, y, radius)
  1213.                     real x, y, radius
  1214.                C:
  1215.                     circf(x, y, radius)
  1216.                          Coord     x, y, radius;
  1217.  
  1218.  
  1219.   Curve Routines.
  1220.      curvebasis(id)
  1221.           Set the basis matrix for a curve to the  matrix  refer-
  1222.           enced  by id.  The matrix and it's id are tied together
  1223.           with a call to defbasis.
  1224.  
  1225.                Fortran:
  1226.                     subroutine curvebasis(id)
  1227.                     integer id
  1228.                C:
  1229.                     curvebasis(id)
  1230.                          short     id;
  1231.  
  1232.  
  1233.      curveprecision(nsegs)
  1234.           Define the number of  line  segments  used  to  draw  a
  1235.           curve.
  1236.  
  1237.                Fortran:
  1238.                     subroutine curveprecision(nsegs)
  1239.                     integer nsegs
  1240.  
  1241.                C:
  1242.                     curveprecision(nsegs)
  1243.                          short     nsegs;
  1244.  
  1245.  
  1246.      rcrv(geom)
  1247.           Draw a rational curve.
  1248.  
  1249.  
  1250.  
  1251. VOGL 1.0            Last change: 6 June 1991                   19
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1259.  
  1260.  
  1261.  
  1262.                Fortran:
  1263.                     subroutine rcrv(geom)
  1264.                     real geom(4,4)
  1265.                C:
  1266.                     rcrv(geom)
  1267.                          Coord     geom[4][4];
  1268.  
  1269.  
  1270.      rcrvn(n, geom)
  1271.           Draw n - 3 rational curve segments. Note: n must be  at
  1272.           least 4.
  1273.  
  1274.                Fortran:
  1275.                     subroutine rcrvn(n, geom)
  1276.                     integer n
  1277.                     real geom(4,n)
  1278.                C:
  1279.                     rcrvn(n, geom)
  1280.                          long n;
  1281.                          Coord     geom[][4];
  1282.  
  1283.  
  1284.      crv(geom)
  1285.           Draw a curve.
  1286.  
  1287.                Fortran:
  1288.                     subroutine crv(geom)
  1289.                     real geom(3,4)
  1290.                C:
  1291.                     crv(geom)
  1292.                          Coord     geom[4][3];
  1293.  
  1294.  
  1295.      crvn(n, geom)
  1296.           Draw n - 3 curve segments. Note: n must be at least 4.
  1297.  
  1298.                Fortran:
  1299.                     subroutine crvn(n, geom)
  1300.                     integer n
  1301.                     real geom(3,n)
  1302.                C:
  1303.                     crvn(n, geom)
  1304.                          long n;
  1305.                          Coord     geom[][3];
  1306.  
  1307.  
  1308.      curveit(n)
  1309.           Draw a curve segment by iterating the top matrix in the
  1310.           matrix  stack as a forward difference matrix. This per-
  1311.           forms 'n' iterations.
  1312.  
  1313.                Fortran:
  1314.  
  1315.  
  1316.  
  1317. VOGL 1.0            Last change: 6 June 1991                   20
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1325.  
  1326.  
  1327.  
  1328.                     subroutine curveit(n)
  1329.                     integer n
  1330.  
  1331.                C:
  1332.                     curveit(n)
  1333.                          short     n;
  1334.  
  1335.  
  1336.   Rectangles and General Polygon Routines.
  1337.      See also Vertex  calls  above.   The  way  in  which  filled
  1338.      polygons (including circles and arcs) are treated depends on
  1339.      the mode that has been set with the polymode call.
  1340.  
  1341.      There are variations on all these routines that end  in  's'
  1342.      and  also end in 'i'. In the case of the 's' variations they
  1343.      take arguments of type Scoord in C and integer*2 in FORTRAN.
  1344.      In  the  case  of  the 'i' variations they take arguments of
  1345.      type Icoord in C and integer in FORTRAN.
  1346.  
  1347.      rect(x1, y1, x2, y2)
  1348.           Draw a rectangle.
  1349.  
  1350.                Fortran:
  1351.                     subroutine rect(x1, y1, x2, y2)
  1352.                     real x1, y1, x1, y2
  1353.                C:
  1354.                     rect(x1, y1, x2, y2)
  1355.                          Coord     x1, y1, x2, y2;
  1356.  
  1357.  
  1358.      rectf(x1, y1, x2, y2)
  1359.           Draw a filled rectangle. (How the filling is  done  may
  1360.           be  changed by calling polymode , if this call has been
  1361.           compilied into the library).
  1362.  
  1363.                Fortran:
  1364.                     subroutine rectf(x1, y1, x2, y2)
  1365.                     real x1, y1, x1, y2
  1366.                C:
  1367.                     rectf(x1, y1, x2, y2)
  1368.                          Coord     x1, y1, x2, y2;
  1369.  
  1370.  
  1371.      poly2(n, points)
  1372.           Construct a (x, y) polygon from an array of points pro-
  1373.           vided by the user.
  1374.  
  1375.                Fortran:
  1376.                     subroutine poly2(n, points)
  1377.                     integer n
  1378.                     real points(2, n)
  1379.                C:
  1380.  
  1381.  
  1382.  
  1383. VOGL 1.0            Last change: 6 June 1991                   21
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1391.  
  1392.  
  1393.  
  1394.                     poly2(n, points)
  1395.                          long n;
  1396.                          Coord     points[][2];
  1397.  
  1398.  
  1399.      polf2(n, points)
  1400.           Construct a filled (x, y)  polygon  from  an  array  of
  1401.           points  provided by the user.  (How the filling is done
  1402.           may be changed by calling polymode , if this  call  has
  1403.           been compilied into the library).
  1404.  
  1405.                Fortran:
  1406.                     subroutine polf2(n, points)
  1407.                     integer n
  1408.                     real points(2, n)
  1409.                C:
  1410.                     polf2(n,  points)
  1411.                          long n;
  1412.                          Coord     points[][2];
  1413.  
  1414.  
  1415.      poly(n, points)
  1416.           Construct a polygon from an array of points provided by
  1417.           the user.
  1418.  
  1419.                Fortran:
  1420.                     subroutine poly(n, points)
  1421.                     integer n
  1422.                     real points(3, n)
  1423.                C:
  1424.                     poly(n,  points)
  1425.                          long n;
  1426.                          float     points[][3];
  1427.  
  1428.  
  1429.      polf(n, points)
  1430.           Construct a filled polygon from an array of points pro-
  1431.           vided  by  the  user.   (How the filling is done may be
  1432.           changed by calling polymode , if  this  call  has  been
  1433.           compilied into the library).
  1434.  
  1435.                Fortran:
  1436.                     subroutine polf(n, points)
  1437.                     integer n
  1438.                     real points(3, n)
  1439.                C:
  1440.                     polf(n, points)
  1441.                          long n;
  1442.                          Coord     points[][3];
  1443.  
  1444.  
  1445.      backface(onoff)
  1446.  
  1447.  
  1448.  
  1449. VOGL 1.0            Last change: 6 June 1991                   22
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1457.  
  1458.  
  1459.  
  1460.           Turns on culling of backfacing polygons. A  polygon  is
  1461.           backfacing  if  it's  orientation in *screen* coords is
  1462.           clockwise.
  1463.  
  1464.                Fortran:
  1465.                     subroutine backface(onoff)
  1466.                     logical onoff
  1467.  
  1468.                C:
  1469.                     backface(onoff)
  1470.                          Boolean   onoff;
  1471.  
  1472.  
  1473.      frontface(onoff)
  1474.           Turns on culling of frontfacing polygons. A polygon  is
  1475.           frontfacing  if  it's orientation in *screen* coords is
  1476.           anticlockwise.
  1477.  
  1478.                Fortran:
  1479.                     subroutine frontface(clockwise)
  1480.                     logical onoff
  1481.  
  1482.                C:
  1483.                     frontface(clockwise)
  1484.                          Boolean   onoff;
  1485.  
  1486.  
  1487.   Text routines.
  1488.      The original VOGLE hardware fonts "small" and  "large"  have
  1489.      the  font  numbers 0 and 1 respectively. The default font is
  1490.      0.
  1491.  
  1492.      font(fontid)
  1493.           Set the current font
  1494.  
  1495.                Fortran:
  1496.                     subroutine font(fontid)
  1497.                     integer fontid;
  1498.  
  1499.                C:
  1500.                     font(fontid)
  1501.                          short     fontid;
  1502.  
  1503.  
  1504.      cmov(x, y, z)
  1505.           Change the current character position. The usual varia-
  1506.           tions with the extensions 'i' and 's' also apply here.
  1507.  
  1508.                Fortran:
  1509.                     subroutine cmov(x, y, z)
  1510.                     real x, y, z;
  1511.  
  1512.  
  1513.  
  1514.  
  1515. VOGL 1.0            Last change: 6 June 1991                   23
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1523.  
  1524.  
  1525.  
  1526.                C:
  1527.                     cmov(x, y, z)
  1528.                          Coord     x, y, z;
  1529.  
  1530.  
  1531.      cmov2(x, y)
  1532.           Change the current character position in x and  y.  The
  1533.           usual  variations  with the extensions 'i' and 's' also
  1534.           apply here.
  1535.  
  1536.                Fortran:
  1537.                     subroutine cmov2(x, y)
  1538.                     real x, y;
  1539.  
  1540.                C:
  1541.                     cmov2(x, y)
  1542.                          Coord     x, y;
  1543.  
  1544.  
  1545.      getheight()
  1546.           Return the maximum height in the current font.
  1547.  
  1548.                Fortran:
  1549.                     integer function getheight
  1550.  
  1551.                C:
  1552.                     long
  1553.                     getheight()
  1554.  
  1555.  
  1556.      getwidth()
  1557.           Return the maximum width in the current font.
  1558.  
  1559.                Fortran:
  1560.                     integer function getwidth
  1561.  
  1562.                C:
  1563.                     long
  1564.                     getwidth()
  1565.  
  1566.  
  1567.      charstr(str)
  1568.           Draw the text in string at the current position.
  1569.  
  1570.                Fortran:
  1571.                     subroutine charst(str, len)
  1572.                     character*(*) str
  1573.                     integer len
  1574.  
  1575.                C:
  1576.                     charstr(str)
  1577.                          char *str;
  1578.  
  1579.  
  1580.  
  1581. VOGL 1.0            Last change: 6 June 1991                   24
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1589.  
  1590.  
  1591.  
  1592.   Transformations Routines.
  1593.      All transformations are cumulative, so if you  rotate  some-
  1594.      thing  and  then do a translate you are translating relative
  1595.      to the rotated axes. If you need  to  preserve  the  current
  1596.      transformation  matrix use pushmatrix(), do the drawing, and
  1597.      then call popmatrix() to get back where you were before.
  1598.  
  1599.      translate(x, y, z)
  1600.           Set up a translation.
  1601.  
  1602.                Fortran:
  1603.                     subroutine translate(x, y, z)
  1604.                     real x, y, z
  1605.                C:
  1606.                     translate(x, y, z)
  1607.                          Coord     x, y, z;
  1608.  
  1609.  
  1610.      scale(x, y, z)
  1611.           Set up scaling factors in x, y, and z axis.
  1612.  
  1613.                Fortran:
  1614.                     subroutine scale(x, y, z)
  1615.                     real x, y, z
  1616.  
  1617.                C:
  1618.                     scale(x, y, z)
  1619.                          Coord     x, y, z;
  1620.  
  1621.  
  1622.      rot(angle, axis)
  1623.           Set up a rotation in axis axis. Axis  is  one  of  'x',
  1624.           'y',  or  'z'.  The angle in this case is a real number
  1625.           in degrees.
  1626.  
  1627.                Fortran:
  1628.                     subroutine rot(angle, axis)
  1629.                     real angle
  1630.                     character axis
  1631.  
  1632.                C:
  1633.                     rot(angle, axis)
  1634.                          float     angle;
  1635.                          char axis;
  1636.  
  1637.  
  1638.      rotate(angle, axis)
  1639.           Set up a rotation in axis axis. Axis  is  one  of  'x',
  1640.           'y',  or  'z',  and  the angle is in tenths of degrees.
  1641.           Makes you feel sentimental doesn't it.
  1642.  
  1643.                Fortran:
  1644.  
  1645.  
  1646.  
  1647. VOGL 1.0            Last change: 6 June 1991                   25
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1655.  
  1656.  
  1657.  
  1658.                     subroutine rotate(angle, axis)
  1659.                     integer angle
  1660.                     character axis
  1661.  
  1662.                C:
  1663.                     rotate(angle, axis)
  1664.                          Angle     angle;
  1665.                          char axis;
  1666.  
  1667.  
  1668.   Patch Routines.
  1669.      patchbasis(tbasisid, ubasisid)
  1670.           Define the t and u basis matrix id's of a patch. It  is
  1671.           assumed  that tbasisid and ubasisid have matrices asso-
  1672.           ciated with  them  already  (this  is  done  using  the
  1673.           defbasis call).
  1674.  
  1675.                Fortran:
  1676.                     subroutine patchbasis(tid, uid)
  1677.                     integer tid, uid
  1678.  
  1679.                C:
  1680.                     patchbasis(tid, ubid)
  1681.                          long tid, uid
  1682.  
  1683.  
  1684.      patchprecision(tseg, useg)
  1685.           Set the minimum  number  of  line  segments  making  up
  1686.           curves in a patch.
  1687.  
  1688.                Fortran:
  1689.                     subroutine patchprecision(tseg, useg)
  1690.                     integer tseg, useg
  1691.  
  1692.                C:
  1693.                     patchprecision(tseg, useg)
  1694.                          long     tseg, useg;
  1695.  
  1696.  
  1697.      patchcurves(nt, nu)
  1698.           Set the number of curves making up a patch.
  1699.  
  1700.                Fortran:
  1701.                     subroutine patchcurves(nt, nu)
  1702.                     integer nt, nu
  1703.  
  1704.                C:
  1705.                     patchcurves(nt, nu)
  1706.                          long     nt, nu;
  1707.  
  1708.  
  1709.      rpatch(gx, gy, gz, gw)
  1710.  
  1711.  
  1712.  
  1713. VOGL 1.0            Last change: 6 June 1991                   26
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1721.  
  1722.  
  1723.  
  1724.           Draws a rational patch in the current basis,  according
  1725.           to the geometry matrices gx, gy, gz, and gw.
  1726.  
  1727.                Fortran:
  1728.                     subroutine rpatch(gx, gy, gz, gw)
  1729.                     real  gx(4,4), gy(4,4), gz(4,4), gw(4,4)
  1730.  
  1731.                C:
  1732.                     rpatch(gx, gy, gz, gw)
  1733.                         Matrix  gx, gy, gz, gw;
  1734.  
  1735.  
  1736.      patch(gx, gy, gz)
  1737.           Draws a patch in the current basis,  according  to  the
  1738.           geometry matrices gx, gy, and gz.
  1739.  
  1740.                Fortran:
  1741.                     subroutine patch(gx, gy, gz)
  1742.                     real  gx(4,4), gy(4,4), gz(4,4)
  1743.  
  1744.                C:
  1745.                     patch(gx, gy, gz)
  1746.                          Matrix  gx, gy, gz;
  1747.  
  1748.  
  1749.   Point Routines.
  1750.      There are variations on all these routines that end  in  's'
  1751.      and  also end in 'i'. In the case of the 's' variations they
  1752.      take arguments of type Scoord in C and integer*2 in FORTRAN.
  1753.      In  the  case  of  the 'i' variations they take arguments of
  1754.      type Icoord in C and integer in FORTRAN.
  1755.  
  1756.      pnt(x, y, z)
  1757.           Draw a point at x, y, z
  1758.  
  1759.                Fortran:
  1760.                     subroutine pnt(x, y, z)
  1761.                     real x, y, z
  1762.  
  1763.                C:
  1764.                     pnt(x, y, z)
  1765.                          Coord     x, y, z;
  1766.  
  1767.  
  1768.      pnt2(x, y)
  1769.           Draw a point at x, y.
  1770.  
  1771.                Fortran:
  1772.                     subroutine pnt2(x, y)
  1773.                     real x, y
  1774.  
  1775.                C:
  1776.  
  1777.  
  1778.  
  1779. VOGL 1.0            Last change: 6 June 1991                   27
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1787.  
  1788.  
  1789.  
  1790.                     pnt2(x, y)
  1791.                          Coord     x, y;
  1792.  
  1793.  
  1794.   Object Routines.
  1795.      Objects are graphical entities created by the  drawing  rou-
  1796.      tines  called  between  makeobj and closeobj. Objects may be
  1797.      called from within other objects. When an object is  created
  1798.      most  of  the  calculations required by the drawing routines
  1799.      called within it are  done  up  to  where  the  calculations
  1800.      involve the current transformation matrix. So if you need to
  1801.      draw the same thing several times on the screen but in  dif-
  1802.      ferent  places  it is faster to use objects than to call the
  1803.      appropriate drawing routines each time.
  1804.  
  1805.      makeobj(n)
  1806.           Commence the object number n.
  1807.  
  1808.                Fortran:
  1809.                     subroutine makeobj(n)
  1810.                     integer n
  1811.  
  1812.                C:
  1813.                     makeobj(n)
  1814.                          Object    n;
  1815.  
  1816.  
  1817.      closeobj()
  1818.           Close the current object.
  1819.  
  1820.                Fortran:
  1821.                     subroutine closeobj()
  1822.  
  1823.                C:
  1824.                     closeobj()
  1825.  
  1826.  
  1827.      genobj()
  1828.           Returns a unique object identifier.
  1829.  
  1830.                Fortran:
  1831.                     integer function genobj()
  1832.  
  1833.                C:
  1834.                     Object
  1835.                     genobj()
  1836.  
  1837.  
  1838.      getopenobj()
  1839.           Return the number of the current object.
  1840.  
  1841.                Fortran:
  1842.  
  1843.  
  1844.  
  1845. VOGL 1.0            Last change: 6 June 1991                   28
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1853.  
  1854.  
  1855.  
  1856.                     integer function getopenobj()
  1857.  
  1858.                C:
  1859.                     Object
  1860.                     getopenobj()
  1861.  
  1862.  
  1863.      callobj(n)
  1864.           Draw object number n.
  1865.  
  1866.                Fortran:
  1867.                     subroutine callobj(n)
  1868.                     integer n
  1869.  
  1870.                C:
  1871.                     callobj(n)
  1872.                          Object    n;
  1873.  
  1874.  
  1875.      isobj(n)
  1876.           Returns non-zero if there is an object of number n.
  1877.  
  1878.                Fortran:
  1879.                     logical function isobj(n)
  1880.                     integer n
  1881.  
  1882.                C:
  1883.                     Boolean
  1884.                     isobj(n)
  1885.                          Object    n;
  1886.  
  1887.  
  1888.   Double Buffering.
  1889.      Where possible VOGL allows for front  and  back  buffers  to
  1890.      enable  things  like  animation  and  smooth updating of the
  1891.      screen. Note: it  isn't  possible  to  have  backbuffer  and
  1892.      frontbuffer true at the same time.
  1893.  
  1894.      gconfig
  1895.           With Iris GL you must  call  gconfig  for  things  like
  1896.           doublebuffering to take effect.
  1897.  
  1898.                Fortran:
  1899.                     subroutine gconfig
  1900.  
  1901.                C:
  1902.                     gconfig()
  1903.  
  1904.  
  1905.      doublebuffer
  1906.           Flags our intention to do double buffering.
  1907.  
  1908.  
  1909.  
  1910.  
  1911. VOGL 1.0            Last change: 6 June 1991                   29
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1919.  
  1920.  
  1921.  
  1922.                Fortran:
  1923.                     subroutine doublebuffer
  1924.  
  1925.                C:
  1926.                     doublebuffer()
  1927.  
  1928.  
  1929.      singlebuffer
  1930.           Switch back to singlebuffer mode.
  1931.  
  1932.                Fortran:
  1933.                     subroutine singlebuffer
  1934.  
  1935.                C:
  1936.                     singlebuffer()
  1937.  
  1938.  
  1939.      backbuffer(Boolean)
  1940.           Make VOGL draw in the backbuffer.
  1941.  
  1942.                Fortran:
  1943.                     subroutine backbuffer(yesno)
  1944.                          logical   yesno;
  1945.  
  1946.                C:
  1947.                     backbuffer(yesno)
  1948.                          Boolean   yesno;
  1949.  
  1950.  
  1951.      frontbuffer(Boolean)
  1952.           Make VOGL draw in the front buffer.
  1953.  
  1954.                Fortran:
  1955.                     subroutine frontbuffer(yesno)
  1956.                          logical   yesno;
  1957.  
  1958.                C:
  1959.                     frontbuffer(yesno)
  1960.                          Boolean   yesno;
  1961.  
  1962.  
  1963.      swapbuffers()
  1964.           Swap the front and back buffers.
  1965.  
  1966.                Fortran:
  1967.                     subroutine swapbuffers
  1968.  
  1969.                C:
  1970.                     swapbuffers()
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977. VOGL 1.0            Last change: 6 June 1991                   30
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. VOGL(3)                C LIBRARY FUNCTIONS                VOGL(3)
  1985.  
  1986.  
  1987.  
  1988.   Position Routines.
  1989.      getgpos(x, y, z, w)
  1990.           Gets the current graphics position in world coords.
  1991.  
  1992.                Fortran:
  1993.                     subroutine getgpos(x, y, z, w)
  1994.                     real x, y, z
  1995.  
  1996.                C:
  1997.                     getgpos(x, y, z, w)
  1998.                          Coord *x, *y, *z, *w;
  1999.  
  2000.  
  2001. BUGS
  2002.      Double buffering isn't supported on all devices.
  2003.  
  2004.      The yobbarays may be turned on or they may be turned off.
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043. VOGL 1.0            Last change: 6 June 1991                   31
  2044.  
  2045.  
  2046.  
  2047.