+-------------+ +----------##
| 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.
- CHOPT
- (CHARACTER*4) option to be set;
- CHVAL
- (CHARACTER*4) value to be assigned to the
option.
The possible value of CHOPT and the corresponding values of CHVAL are the
following:
- PROJ
- selects the type of projection, it can have the
following values:
- PARA
- orthographic parallel projection (the default);
- PERS
- perspective projection.
- THRZ
- acronym for Tracks and Hits in a Radius versus
Z projection, where R is the vertical axis and Z the horizontal one. This
special projection, if activated, is used by the drawing system for tracks
and hits only in the following cases:
- X-Z cut
- (CUTTHE=90 and CUTPHI=90 in
GDRAWX or icut=2 in
GDRAWC);
- Y-Z cut
- (CUTTHE=90 and CUTPHI=180 in
GDRAWX or icut=1 in
GDRAWC).
The option can have the following values:
- 360
- for a rotation around 360 degrees, so all the
projected points will have R positive;
- 180 or ON
- for a rotation around 180 degrees, so the
points will have R positive or negative depending on the sign of their Y
coordinate in the Projection Reference System;
- OFF
- (the default) for not activating the R-Z
projection and having the standard X-Z or Y-Z projections.
Note: When the THRZ option is set to ON or 180, an effect of particle
reflection will be noticed for particles originating in one half space and
going to the other half: when crossing the horizontal axis they will be
reflected back into the original half space. If this way of drawing should
cause problems for the user, the option 360 can be chosen, by which all
the tracks (and hits) are on the top (positive) half space.
- TRAK
- selects the way tracks are drawn. Possible
values:
- LINE
- (the default) the lines joining track points
are drawn by GDXYZ;
- POIN
- only the track points are drawn.
- HIDE
- selects the hidden line removal technique for
the drawings. Possible values are:
- OFF
- (the default) hidden lines are not removed from
the drawing. The drawing is usually rather fast, but the resulting drawing
can be quite messy if many volumes are visible;
- ON
- hidden lines are not drawn. If this value is
selected, the detector can be exploded (interactive command BOMB), cut
with different shapes (interactive command menu CVOL), and some parts can
be shifted from their original position (interactive command SHIFT).
Drawing with hidden line removal can be demanding in terms of CPU time and
memory. At the end of each drawing the program displays the memory used
and the statistics on the volume visibility. When the drawing requires
more memory than available, the program will evaluate and display the
number of missing words, so that the user can increase accordingly the
size of the ZEBRA store in the
common /GCBANK/.
- SHAD
- when HIDE is ON, selects the shading and
filling option for the detector's surfaces that are drawn.
- OFF
- (the default) no shading of the surfaces will be
performed;
- ON
- the volume surfaces will be filled according to
the value of their FILL and LWID attribute, set via GSATT:
- FILL=1
- the surfaces are filled with the current
colour assigned to the volume via
GSATT. 166 different colours are
available.
- FILL>1
- the surfaces are filled with a shade of the
basic colour assigned to the volume according to their angle with respect
to the line of illumination (which coincides with the line of view). The
resolution increases with the value of FILL (1< FILL <=8).
- LWID>0
- just as the number of scan-lines used to fill
a surface depends on the value of FILL, their width depends on the value
of LWID. Increasing the value of LWID will result in thicker lines.
- EDGE
- gives the possibility not to draw the edges, so
that they will be visible only as intersections of filled faces with
different luminosity. For the volumes which are not filled, the normal
edges will be drawn irrespective of the value of this option.
+--------------------------------------------------------+
| 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.
- ZFU
- (REAL) zoom factor for U coordinate;
- ZFV
- (REAL) zoom factor for V coordinate;
- UZ0
- (REAL) U coordinate of centre of zoom;
- VZ0
- (REAL) V coordinate of centre of zoom;
- U0
- (REAL) U coordinate of centre of zoom in the
resulting picture;
- V0
- (REAL) V coordinate of centre of zoom in the
resulting picture.
+------------------------------------------------+
|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.
- X0
- (REAL) X coordinate of origin;
- Y0
- (REAL) Y coordinate of origin;
- Z0
- (REAL) Z coordinate of origin;
- AXSIZ
- (REAL) axis size in centimeters.
+----------------------------------------+
| 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.
- U0
- (REAL) U coordinate of the centre of the scale;
- V0
- (REAL) V coordinate of the centre of the scale.
+-------------------------------------------------------------------------+
|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.
- U0
- (REAL) U coordinate of the centre of the figure;
- V0
- (REAL) V coordinate of the centre of the figure.
+--------------------------------------------------------------------+
| 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).
- U
- (REAL) U position of text string;
- V
- (REAL) V position of text string;
- CHTEXT
- (CHARACTER*(*)) text string, optionally
terminated by a dollar sign;
- SIZE
- (REAL) character size (cm);
- ANGLE
- (REAL) rotation angle (degrees);
- LWIRTH
- (INTEGER) line width (1,2,3,4,5);
- IOPT
- (INTEGER) centering option for the text:
- -1
- left adjusted;
- 0
- centered;
- 1
- right adjusted.
+----------------------------------------+
|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.
- U
- (REAL) array of U coordinates;
- DT
- (REAL) array of V coordinates;
- NP
- (INTEGER) number of points.
+----------------------------------------------------+
|CALL GDHEAD (ISEL,CHNAME,CHRSIZ) |
+----------------------------------------------------+
Draws a frame header. Different options can be chosen by the argument
ISEL.
- ISEL
- (INTEGER) option to be selected for the title
name (decimal integer):
- 0
- to have only the header lines;
- xxxxx1
- to add the text CHNAME centered on top of
header;
- xxxx1x
- to add global detector name (first volume) on
left;
- xxx1xx
- to add date on right;
- xx1xxx
- to select thick characters for text in top of
head (i.e. with larger line width);
- x1xxxx
- to add the text EVENT NR x on top of header;
- 1xxxxx
- to add the text RUN NR x on top of header.
Note: ISEL=x1xxx1 or ISEL=1xxxx1 are illegal choices, i.e. they generate
overwritten text.
- CHNAME
- (CHARACTER*4) title string, optionally
terminated by a dollar sign;
- CHRSIZ
- (REAL) character size (cm) of text CHNAME.
+------------------------------------+
|CALL GDCOL (ICOL) |
+------------------------------------+
Sets the colour code.
- ICOL
- colour code (1,2,...,8), it can be positive,
negative, or zero.
- <0
- to set the colour permanently;
- <0
- to set the colour temporarily;
- =0
- to restore the permanent colour value.
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.
- LW
- Line width code (1,2,...,5), it can be
positive, negative, or zero.
- <0
- to set the line width permanently;
- >0
- to set the line width temporarily;
- =0
- to restore the permanent line width value.
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.
- U0
- (REAL) U coordinate of the graphics cursor;
- V0
- (REAL) V coordinate of the graphics cursor;
- ICHAR
- (INTEGER) ASCII value of the key pressed.
+------------------------------------------------+
|CALL GDFR3D (X,NPOINT,U*,V*) |
+------------------------------------------------+
Converts from 3D space coordinates (either in MAster or Daughter Reference
System) to the corresponding 2D user coordinates.
- X
- (REAL) array X(3,NPOINT) of space points;
- NPOINT
- (INTEGER) number of points:
- >0
- X is in the current DRS;
- <0
- X is in MARS;
- U
- (REAL) array of NPOINT U coordinates;
- V
- (REAL) array of NPOINT V coordinates.
This routine maps a space point (X, Y, Z in a right-handed reference
system) onto a plane perpendicular to the observer's line of sight,
defined by the spherical angles theta, phi:
- theta
- the angle between the line of sight and the Z
axis (0<=theta< =180);
- phi
- the angle between the X axis and the projection
onto the X-Y plane of the line of sight (0<=phi< =360).
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).
- XIN
- (REAL) array XIN(3,NPOINT) of input points in
MARS;
- NPOINT
- (INTEGER) number of points;
- XOUT
- (REAL) array XOUT(3,NPOINT) of output points in
PRS.