+-------------+ +----------##
| Geant 3.15 | GEANT User's Guide | DRAW115 ##
+-------------+ +----------##
Author(s) : F.Carminati, P.Zanarini Submitted: 01.01.86
Origin : P.Zanarini Revised: 11.12.92
+-----------------------------------------------------------------------------------+
|CALL GDRVOL (NNAMS,CHNAMS,LNUMBS,NRS,THETA,PHI,PSI,U0,V0,SU,SV) |
+-----------------------------------------------------------------------------------+
Draws an orthographic parallel projection or a perspective projection
(depending on the option chosen via
GDOPT) of the volume
CHNAMS(N),LNUMBS(N) with all its descendants, at the position U0,V0 (user
coordinates), with the scale factors SU and SV. The object is seen from
THETA and PHI angles, and the resulting 2D projection is also rotated by
an angle PSI on the screen plane. These parameters, as well as zoom
parameters set by GDZOOM, define
the current view parameters, and they are copied in
/GCDRAW/. Attributes like
colour, fill area, line width, line style, visibility, etc. can be set by
the GSATT routine for CHNAMS(N)
and or its descendants [GEOM 500]. This routine differs from
GDRAW in the following aspects:
- The object to be drawn is identified by a full path. This gives the
possibility of drawing a particular copy or division of a volume, or even
a volume that has more than one mother in the geometry tree.
CHNAMS(1),...,CHNAMS(N) contain the volume names and
LNUMBS(1),...,LNUMBS(N), the volume numbers defining the path to go from
the top volume to the one to be drawn.
- The object can be drawn either with respect to the MAster Reference
System (NRS=0) or with respect to its Daugther Reference System (i.e. the
Local R.S.); in the first case it is drawn in its position in the real
world, while in the second one it is drawn like
GDRAW would do.
- In this latter case, track and hit points will be drawn with respect
to the DRS of the volume last drawn by this routine, and not with respect
to the MARS as is done normally (to reset to the normal case a call with
NRS=0 or NNAMS=0 is required).
- NNAMS
- (INTEGER) number of elements levels in the
arrays CHNAMS, LNUMBS. The bottom volume of this path is also the one that
is actually drawn;
- CHNAMS
- (CHARACTER*4) array of volume name
(dimensioned at least to NNAMS);
- LNUMBS
- array of volume numbers (dimensioned at least
to NNAMS);
- NRS
- reference system used:
- NRS=0
- to have the volume(s) drawn with respect to
the MARS
- NRS!=0
- to have the volume(s) drawn with respect to
the DRS
- THETA
- theta angle between the line of sight and the
Z axis of MARS;
- PHI
- phi angle between the projection of the line of
sight on plane X Y and the X axis of MARS
- PSI
- psi angle by which the projected image will be
rotated on the screen plane
- U0
- u coordinate on the screen of the volume origin
- V0
- v coordinate on the screen of the volume origin
- SU
- scale factor for u coordinates
- SV
- scale factor for v coordinates
Here follows an example of the use of
GDRVOL:
CHARACTER*4 CHNAMS(5)
INTEGER LNUMBS(5)
DATA CHNAMS/'OPAL','BRL-','EB ','EBB ','EBP '/
DATA LNUMBS/ 1 , 1 , 1 , 1 , 20 /
- - - - -
NRS=0
CALL GDRVOL(5,CHNAMS,LNUMBS,NRS,45.,135.,0.,10.,10.,0.01,0.01)
CALL GDAXIS(0.,0.,0.,300.)
CALL GDXYZ(0)
- - - - -
NRS=1
CALL GDRVOL(5,CHNAMS,LNUMBS,NRS,45.,135.,0.,10.,10.,0.01,0.01)
CALL GDAXIS(0.,0.,0.,300.)
CALL GDXYZ(0)