5 * Revision 1.1.1.1 1995/10/24 10:20:30 cernlib
9 #include "geant321/pilot.h"
10 *CMZ : 3.21/02 03/07/94 19.26.33 by S.Giani
12 SUBROUTINE GDRAYT(NAME,UTHET,UPHI,UPSI,UU0,UV0,SU,SV)
14 C. ******************************************************************
17 C. * This routine draws the objects, in the Jvolum data *
18 C. * data structure, that are visible. The objects are drawn *
19 C. * at the screen point (UU0,UV0), with the *
20 C. * screen factors SU and SV acting on the U and V *
21 C. * dimensions respectively; *
22 C. * the object is rotated by an angle UTHET along Y-axis *
23 C. * and UPHI along Z-axis and the resulting 2-D picture *
24 C. * is also rotated by an angle UPSI along the line of *
25 C. * projection (i.e. the normal to the 2-D view plane). *
27 C. * Author: S.Giani. *
28 C. ******************************************************************
30 #include "geant321/gcbank.inc"
31 #include "geant321/gcvolu.inc"
32 #include "geant321/gcunit.inc"
33 #include "geant321/gcdraw.inc"
34 #include "geant321/gconst.inc"
35 #include "geant321/gcmutr.inc"
36 ********************************************************************************
37 #include "geant321/gcflag.inc"
38 #include "geant321/gcstak.inc"
39 #include "geant321/gcrayt.inc"
40 #include "geant321/gcpixe.inc"
42 ********************************************************************************
50 CALL UCTOH('PERS',IPERS,4,4)
57 IF (IFIRST.NE.0) GO TO 40
74 C Theta, phi and psi angles are normalized in [0-360[ range
77 GTHETA=MOD(ABS(UTHET),360.)
78 GPHI=MOD(ABS(UPHI),360.)
79 GPSI=MOD(ABS(UPSI),360.)
82 * Set Transformation Matrix T as for CG Package
88 ********************************************************************************
91 if(iswit(9).ne.67890)CALL IGBOX(0.,20.,20.,0.)
94 AROTS(IHH,JHH)=T(JHH,IHH)
103 ZROTS(IHH,JHH)=AROTS(IHH,JHH)
106 CALL RINV(4,ZROTS,4,RRR,IFAIL)
108 IF(IPERS.EQ.IPRJ)THEN
110 IF(DPERS.GT.5000.)DPERS=5000.
112 FPINTX=ZROTS(1,4)+ZROTS(1,1)*
113 + 10.+ZROTS(1,2)*10.+ZROTS(1,3)*
115 FPINTY=ZROTS(2,4)+ZROTS(2,1)*
116 + 10.+ZROTS(2,2)*10.+ZROTS(2,3)*
118 FPINTZ=ZROTS(3,4)+ZROTS(3,1)*
119 + 10.+ZROTS(3,2)*10.+ZROTS(3,3)*
123 CALL GFIND('*','FILL',ISFILL)
124 IF(ISFILL.EQ.0)ISFILL=10
135 IF(NMAP.GT.0)IMAP=IMAP+1
137 IF(ISFILL.LT.NMAP)ISFILL=NMAP
142 ELSEIF(IMAP.EQ.2)THEN
151 IF(IPERS.EQ.IPRJ)THEN
158 XPINTS=ZROTS(1,4)+ZROTS(1,1)*
159 + UUU+ZROTS(1,2)*VVV+ZROTS(1,3)*
161 YPINTS=ZROTS(2,4)+ZROTS(2,1)*
162 + UUU+ZROTS(2,2)*VVV+ZROTS(2,3)*
164 ZPINTS=ZROTS(3,4)+ZROTS(3,1)*
165 + UUU+ZROTS(3,2)*VVV+ZROTS(3,3)*
167 * print *,xpints,ypints,zpints,'vertex from gdraw'
175 ********************************************************************************