+-------------+                                               +----------##
| Geant 3.15  |               GEANT User's Guide              | DRAW400  ##
+-------------+                                               +----------##
                                   
                                   
Author(s) : F.Carminati                                Submitted: 15.08.83
Origin    : P.Zanarini, S.Giani                          Revised: 09.11.92
                                  
Several drawing options can be set via the routine GDOPT (corresponding to the DOPT interactive command).
              +--------------------------------------------+
              | CALL GDOPT (CHOPT,CHVAL) |
              +--------------------------------------------+
                                  
Sets drawing options.
The possible value of CHOPT and the corresponding values of CHVAL are the following:
        +--------------------------------------------------------+
        | CALL GDZOOM (ZFU,ZFV,UZ0,VZ0,U0,V0) |
        +--------------------------------------------------------+
                                  
This routine sets the zoom parameters (part of the viewing parameters in /GCDRAW/) that define how the various objects (detector, tracks, hits, etc.) will be displayed by the subsequent drawing operations. The zoom is computed around UZ0, VZ0 (user coordinates). This point will be moved to U0, V0 in the resulting picture. ZFU, ZFV are the zoom factors (positive). If ZFU or ZFV are zero, the zoom parameters are reset, and the original viewing is restored.
            +------------------------------------------------+
            |CALL GDAXIS (X0,Y0,Z0,AXSIZ) |
            +------------------------------------------------+
                                  
Draws the axes of the MAster Reference System, corresponding to the current viewing parameters. All the arguments are in MARS units.
                +----------------------------------------+
                | CALL GDSCAL (U0,V0) |
                +----------------------------------------+
                                  
Draws a scale corresponding to the current viewing parameters. Seven kinds of units are available, from 1 micron to 100 cm. The best unit is automatically selected.
+-------------------------------------------------------------------------+
|CALL GDMAN (U0,V0)                  CALL GWOMA1(U0,V0) |
+-------------------------------------------------------------------------+
                                  
+---------------------------------------------------------------------------+
|CALL GDWMN2 (U0,V0)                  CALL GDWMN3(U0,V0) |
+---------------------------------------------------------------------------+
                                  
Draws the profile of a man, or three different female figures in 2D user coordinates, with the current scale factors. The figure is approximately 160 cm high.
  +--------------------------------------------------------------------+
  | CALL GDRAWT (U,V,CHTEXT,SIZE,ANGLE,LWIDTH,IOPT) |
  +--------------------------------------------------------------------+
                                  
Draws text with software characters. It has the same arguments of the HPLOT [bib-HPLOT] routine HPLSOF (a call to HPLSOF is actually performed).
                +----------------------------------------+
                |CALL GDRAWV (U,V,NP) |
                +----------------------------------------+
                                  
Draws 2D polylines in user coordinates. The routine GDFR3D can be called to transform 3D points in 2D user coordinates.
          +----------------------------------------------------+
          |CALL GDHEAD (ISEL,CHNAME,CHRSIZ) |
          +----------------------------------------------------+
                                  
Draws a frame header. Different options can be chosen by the argument ISEL.
                  +------------------------------------+
                  |CALL GDCOL (ICOL) |
                  +------------------------------------+
                                  
Sets the colour code.
For example we can set ICOL=-1 to start with colour 1, then change to ICOL=3 to set colour 3, and at the end restore the original colour by setting ICOL=0 that takes colour 1 again.
                    +--------------------------------+
                    |CALL GDLW (LW) |
                    +--------------------------------+
                                  
Sets the line width.
For example we can set LW=-1 to start with line width 1, then change to LW=3 to set line width 3, and at the end restore the original line width by setting LW=0 that takes line width 1 again.
            +------------------------------------------------+
            |CALL GDCURS (U0*,V0*,ICHAR*) |
            +------------------------------------------------+
                                  
A graphics input is provided by this routine to fetch the 2D user coordinates of the graphics cursor on the screen, allowing an immediate user interface with the interactive version of GEANT. Interactive commands to zoom, measure, or pick tracks or hits make use of this routine. When the routine is called in the interactive version of GEANT, it draws on the screen the present position of the graphics cursor, which can be moved with the mouse. The user then positions the cursor and presses the left button. The routine returns then in U0, V0 the user coordinates of the graphics cursor. On terminals which do not have the mouse, the graphic cursor is moved with the arrows, and the point is acquired when any key, except carriage return is pressed. In this case the routine returns in ICHAR the ASCII value of the key pressed. If the user types the carriage return, the previous value is retained.
            +------------------------------------------------+
            |CALL GDFR3D (X,NPOINT,U*,V*) |
            +------------------------------------------------+
                                  
Converts from 3D space coordinates (either in MAster or Daughter Reference System) to the corresponding 2D user coordinates.
The plane onto which the point is mapped is actually the X-Y plane of the Projection Reference System, and the observer's line of sight is the Z axis of PRS. The vertical axis on this plane (Y axis on PRS) is obtained by intersecting this plane with the one of MARS or DRS containing the line of sight and the Y axis.
           +--------------------------------------------------+
           |CALL GD3D3D (XIN,NPOINT,XOUT*) |
           +--------------------------------------------------+
                                  
Converts from 3D space coordinates in MARS to 3D coordinates in Projection Reference System (whose Z axis is along the line of sight given by theta and phi angles).