22.05.2014 Views

CERN Program Library Long Writeup W5013 - CERNLIB ...

CERN Program Library Long Writeup W5013 - CERNLIB ...

CERN Program Library Long Writeup W5013 - CERNLIB ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Geant 3.15 GEANT User’s Guide DRAW115<br />

Origin : P.Zanarini Submitted: 01.01.86<br />

Revision : Revised: 11.12.92<br />

Documentation : P.Zanarini, F.Carminati<br />

Drawing a Volume Projection view – Case 2<br />

CALL GDRVOL<br />

(NNAMS,CHNAMS,LNUMBS,NRS,THETA,PHI,PSI,U0,V0,SU,SV)<br />

Draws an orthographic parallel projection or a perspective projection (depending on the option chosen via<br />

GDOPT) of the volume CHNAMS(N),LNUMBS(N) with all its descendants, at the position U0,V0 (user coordinates),<br />

with the scale factors SU and SV. The object is seen from THETA and PHI angles, and the resulting 2D<br />

projection is also rotated by an angle PSI on the screen plane. These parameters, as well as zoom parameters<br />

set by GDZOOM,define the current view parameters, and they are copied in /GCDRAW/. Attributes like colour,<br />

fill area, line width, line style, visibility, etc. can be set by the GSATT routine for CHNAMS(N) and or its<br />

descendants [GEOM 500]. This routine differs from GDRAW in the following aspects:<br />

• The object to be drawn is identified by a full path. This gives the possibility of drawing a particular<br />

copy or division of a volume, or even a volume that has more than one mother in the geometry<br />

tree. CHNAMS(1),...,CHNAMS(N) contain the volume names and LNUMBS(1),...,LNUMBS(N), the<br />

volume numbers defining the path to go from the top volume to the one to be drawn.<br />

• The object can be drawn either with respect to the MAster Reference System (NRS=0) or with respect<br />

to its Daugther Reference System (i.e. the Local R.S.); in the first case it is drawn in its position in the<br />

real world, while in the second one it is drawn like GDRAW would do.<br />

• In this latter case, track and hit points will be drawn with respect to the DRS of the volume last drawn<br />

by this routine, and not with respect to the MARS as is done normally (to reset to the normal case a call<br />

with NRS=0 or NNAMS=0 is required).<br />

NNAMS<br />

CHNAMS<br />

LNUMBS<br />

NRS<br />

THETA<br />

PHI<br />

PSI<br />

U0<br />

V0<br />

SU<br />

SV<br />

(INTEGER) number of elements levels in the arrays CHNAMS, LNUMBS. The bottom volume of<br />

this path is also the one that is actually drawn;<br />

(CHARACTER*4) array of volume name (dimensioned at least to NNAMS);<br />

array of volume numbers (dimensioned at least to NNAMS);<br />

reference system used:<br />

NRS=0 to have the volume(s) drawn with respect to the MARS<br />

NRS≠0 to have the volume(s) drawn with respect to the DRS<br />

θ angle between the line of sight and the Z axis of MARS;<br />

φ angle between the projection of the line of sight on plane X Yand the X axis of MARS<br />

ψ angle by which the projected image will be rotated on the screen plane<br />

u coordinate on the screen of the volume origin<br />

v coordinate on the screen of the volume origin<br />

scale factor for u coordinates<br />

scale factor for v coordinates<br />

Two examples of use of GDRVOL are shown in fig 9 and 10.<br />

76 DRAW115 – 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!