5 * Revision 1.1.1.1 1999/05/18 15:55:17 fca
8 * Revision 1.1.1.1 1995/10/24 10:20:46 cernlib
12 #include "geant321/pilot.h"
13 *CMZ : 3.21/02 29/03/94 15.41.32 by S.Giani
15 SUBROUTINE GPASET(PAR)
17 C- Created 12-JUN-1991 Nils Joar Hoimyr
18 C- Modified 21.02.1992 Jouko Vuoskoski
20 C- Calculates the coordinates of the corner points of a GEANT PARA shape
21 C- from the shape parameters. The end faces are generated by drawing
22 C- connected polylines between the corner points at each Z-end of the shape.
23 C- A ruled solid is then defined between the 2 faces, and written out in SET.
24 C---------------------------------------------------------
26 #include "geant321/gcsetf.inc"
30 REAL P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
31 REAL P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
34 C----------------------------------------------------------------------
42 C Calculation of corner points (verify PHI/THETA coordinates,
43 C I.e. TXZ AND TYZ should possibly change place)
46 P1X= -DX*COS(TYZ)-DY*SIN(TXY)
48 P1Z= -DZ*COS(TXZ)-DY*SIN(TXY)
50 P2X= DX*COS(TYZ)-DY*SIN(TXY)
52 P2Z= -DZ*COS(TXZ)-DY*SIN(TXY)
54 P3X= DX*COS(TYZ)-DY*SIN(TXY)
56 P3Z= -DZ*COS(TXZ)+DY*SIN(TXY)
58 P4X= DX*COS(TYZ)-DY*SIN(TXY)
60 P4Z= -DZ*COS(TXZ)+DY*SIN(TXY)
64 P5X= -DX*COS(TYZ)+DY*SIN(TXY)
66 P5Z= DZ*COS(TXZ)-DY*SIN(TXY)
68 P6X= DX*COS(TYZ)+DY*SIN(TXY)
70 P6Z= DZ*COS(TXZ)-DY*SIN(TXY)
72 P7X= DX*COS(TYZ)+DY*SIN(TXY)
74 P7Z= DZ*COS(TXZ)+DY*SIN(TXY)
76 P8X= -DX*COS(TYZ)+DY*SIN(TXY)
78 P8Z= DZ*COS(TXZ)+DY*SIN(TXY)
80 C DESCRIBED BY 2 FACES represented by polylines
81 C connected by the corners of the shape.
82 C *WRITE SET@103,F1#3,3,2,P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
83 C *WRITE SET@103,F2#3,3,2,P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
84 C *WRITE SET @100,N#145,!F1,!F2
86 C----------------------------------------------------------------------
88 WRITE(BLKSTR,10000)N1,P1X,P1Y,P1Z,P2X,P2Y,P2Z, P3X,P3Y,P3Z,P4X,
92 WRITE(BLKSTR,10000)N1,P5X,P5Y,P5Z,P6X,P6Y,P6Z, P7X,P7Y,P7Z,P8X,
96 WRITE(BLKSTR,10100)N1,N1-2,N1-1
99 10000 FORMAT('@103,',I10,',:5,2#3,3,2,',G14.7,',',G14.7,','
100 + ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7,','
101 + ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7)
102 10100 FORMAT('@100,',I10,',:5,2#145,!',I10,',!',I10)