next up previous index
Next: DRAW120 Draw a Up: GEANT Previous: DRAW110 Drawing a

DRAW115 Drawing a Volume Projection view -- Case 2

Routine ID: DRAW115
Author(s): Submitted: 01.01.86
Origin: P.ZanariniRevised: 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:

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
.gifi; 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 gif and gif.

 

       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 up previous index
Next: DRAW120 Draw a Up: GEANT Previous: DRAW110 Drawing a


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