Next: DRAW120 Draw a
Up: GEANT
Previous: DRAW110 Drawing a
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
-
angle between the line of sight and the
Z axis of MARS;
- PHI
-
angle between the projection of the line of sight
on plane X Y and the X axis of MARS
- 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
Two examples of use of GDRVOL are shown in fig and
.
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,80.,135.,0.,13.,10.,0.03,0.03)
CALL GDAXIS(0.,0.,0.,200.)
C CALL GDXYZ(0)
Figure: Example of use of GDRVOL in the MAster Reference System
CHARACTER*4 CHNAMS(5)
INTEGER LNUMBS(5)
DATA CHNAMS/'OPAL','BRL-','EB ','EBB ','EBP '/
DATA LNUMBS/ 1 , 1 , 1 , 1 , 20 /
.
.
.
NRS=1
CALL GDRVOL(5,CHNAMS,LNUMBS,NRS,55.,135.,0.,5.,5.,0.035,0.035)
CALL GDAXIS(0.,0.,0.,200.)
C CALL GDXYZ(0)
Figure: Example of use of GDRVOL in the Daughter Reference System
P.Zanarini
DRAW120
Next: DRAW120 Draw a
Up: GEANT
Previous: DRAW110 Drawing a
Janne Saarela
Mon Apr 3 12:46:29 METDST 1995