5 * Revision 1.1.1.1 1999/05/18 15:55:17 fca
8 * Revision 1.1.1.1 1995/10/24 10:20:47 cernlib
12 #include "geant321/pilot.h"
13 *CMZ : 3.21/02 29/03/94 15.41.32 by S.Giani
15 SUBROUTINE GTRSET(PAR)
17 C- Created 26-JUL-1991 Nils Joar Hoimyr
18 C- Modified 21.02.1992 Jouko Vuoskoski
20 C- Calculates the coordinates of the corner points of a GEANT GTRA 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
33 C----------------------------------------------------------------------
35 C GTRA as TRAP except that the faces are rotated aroud the Z-axis
41 TX= (PAR(2)*3.14159265359)/180.
42 TY= (PAR(3)*3.14159265359)/180.
43 TWIST=(PAR(4)*3.14159265359)/180.
50 C Parameter conv for faces..
84 C DESCRIBED BY 2 FACES represented by polylines
85 C connected by the 4 corners of the shape.
86 C *WRITE SET@103,F1#3,3,2,P1X,P1Y,P1Z,P2X,P2Y,P2Z,P3X,P3Y,P3Z,P4X,P4Y,P4Z
87 C Geometric Transformation
88 C*WRITE SET @302,N1..#301,R1,R2,R3,R4,R5,R6,R7,R8,R9
90 C *WRITE SET@103,F2#3,3,2,P5X,P5Y,P5Z,P6X,P6Y,P6Z,P7X,P7Y,P7Z,P8X,P8Y,P8Z
92 C *WRITE SET @100,N#145,!F1,!F2,
93 C-------------------------------------------------------------------
95 WRITE(BLKSTR,10000)N1,P1X,P1Y,P1Z,P2X,P2Y,P2Z, P3X,P3Y,P3Z,P4X,
100 C Rotation around the Z-axis. Coeffisients of rotation:
111 C Twist applied, results in constructed faces.
113 WRITE(BLKSTR,10100)N1,R1,R2,R3,R4,R5,R6,R7,R8,R9
116 WRITE(BLKSTR,10200)N1,N1-2,N1-1
120 WRITE(BLKSTR,10000)N1,P5X,P5Y,P5Z,P6X,P6Y,P6Z, P7X,P7Y,P7Z,P8X,
125 C Rotation around the Z-axis. Coeffisients of rotation:
136 C Twist applied, results in constructed faces.
138 WRITE(BLKSTR,10100)N1,R1,R2,R3,R4,R5,R6,R7,R8,R9
141 WRITE(BLKSTR,10200)N1,N1-2,N1-1
144 WRITE(BLKSTR,10300)N1,N1-4,N1-1
147 10000 FORMAT('@103,',I10,',:5,2#3,3,2,',G14.7,',',G14.7,','
148 + ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7,','
149 + ,G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7)
150 10100 FORMAT('@302,',I10,'#301,',G14.7,',',G14.7,',',G14.7
151 + ,',',G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7,',',G14.7)
152 10200 FORMAT('@113,',I10,',:5,2#101,!',I10,',!',I10)
153 10300 FORMAT('@100,',I10,',:5,2#145,!',I10,',!',I10)