next up previous index
Next: GEOM001 The geometry Up: GEANT Previous: DRAW399 The data

DRAW400 Utility routines of the drawing package

Routine ID: DRAW400
Author(s): Submitted: 15.08.83
Origin: P.ZanariniRevised: 16.12.93

CALL GDOPT (CHOPT,CHVAL)

CHOPT
( CHARACTER*4) option to be set;
CHVAL
( CHARACTER*4) value to be assigned to the option.

Drawing options can be set via the routine GDOPT (corresponding to the DOPT interactive command). The possible value of CHOPT and 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 of the drawing and Z the horizontal one. If a cut view has been drawn with the following parameters:
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 different values of the option THRZ have the following effect on the drawing of hits and tracks:
360
hits and tracks will be rotated around Z onto the Z-R, R>0 half plane;
180
(equivalent to ON) hits and tracks will be rotated around Z onto the Z-R plane by the smaller φ angle, so to conserve the sign of their R-ordinate (where R is either X or Y;
OFF
(the default) tracks and hits will be projected from their position in space onto the plane R-Z.

Note: when the THRZ option is set to ON or 180, particles originating in one half space and crossing the horizontal axis will be reflected back into the original half space. If the option 360 can be chosen, all 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 result can be quite messy if a large number of volumes is 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, the resolution increases with the value of FILL (1< FILL 7);
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
control drawing of the volume edges in HIDE=ON, FILL=ON mode:
ON
the edges of the faces are not drawn, so that they will be visible only as intersections of filled faces with different luminosity;
OFF
the edges of the faces are drawn. 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)

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.
This routine sets the zoom parameters (part of the viewing parameters in common /GCDRAW/) that define how objects 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)

X0
( REAL) X coordinate of origin;
Y0
( REAL) Y coordinate of origin;
Z0
( REAL) Z coordinate of origin;
AXSIZ
( REAL) axis size in centimeters.
Draws the axes of the MAster Reference System, corresponding to the current viewing parameters. All the arguments refer to the MARS.

CALL GDSCAL (U0,V0)

U0
( REAL) U coordinate of the centre of the scale;
V0
( REAL) V coordinate of the centre of the scale.
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)

U0
( REAL) U coordinate of the centre of the figure;
V0
( REAL) V coordinate of the centre of the figure.
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)

U
( REAL) U position of text string;
V
( REAL) V position of text string;
CHTEXT
( CHARACTER*(*)) text string;
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.
Draws text with software characters. It has the same arguments of the HPLOT[] routine HPLSOF (a call to HPLSOF is actually performed).

CALL GDRAWV (U,V,NP)

U
( REAL) array of U coordinates;
DT
( REAL) array of V coordinates;
NP
( INTEGER) number of points.
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)

ISEL
( INTEGER) option to be selected for the title name (decimal integer):
0
only the header lines;
xxxxx1
add the text CHNAME centered on top of header;
xxxx1x
add global detector name (first volume) on left;
xxx1xx
add date on right;
xx1xxx
select thick characters for text in top of head (i.e. with larger line width);
x1xxxx
add the text EVENT NR x on top of header;
1xxxxx
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;
CHRSIZ
( REAL) character size (cm) of text CHNAME.
This routine draws a frame header.

CALL GDCOL (ICOL)

This routine has been kept for backward compatibility. The appropriate HIGZ routines should be called instead.

ICOL
( INTEGER) 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.
This routine 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)

This routine has been kept for backward compatibility. The appropriate HIGZ routines should be called instead.

LW
( INTEGER) 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.
This routine 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*)

U0
( REAL) U coordinate of the graphics cursor;
V0
( REAL) V coordinate of the graphics cursor;
ICHAR
( INTEGER) ASCII value of the key pressed.
A graphics input is provided by this routine to fetch the 2D user coordinates of the graphics cursor on the screen. 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, the present position of the graphics cursor on the screen becomes visible and it 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*)

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.
Converts from 3D space coordinates (either in MAster or Daughter Reference System) to the corresponding 2D user 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 θ , φ :

θ

the angle between the line of sight and the Z axis (0 ≤θ≤180 );
φ

the angle between the X axis and the projection onto the X-Y plane of the line of sight (0 ≤φ≤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*)

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.
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 θ and φ angles).

F.Bruyant

GEOM001


next up previous index
Next: GEOM001 The geometry Up: GEANT Previous: DRAW399 The data


Janne Saarela
Mon Apr 3 12:46:29 METDST 1995