spin8: a fortran 77 program for automated rotation of poles
TRANSCRIPT
Computers & Geosciences Vol. 13. No. 3. pp. 235-254. 1987 0098-3004/87 $3.00 + 0.00 Pranted in Great Britain, Pergamon Journals Ltd
SPIN8: A FORTRAN 77 PROGRAM FOR AUTOMATED ROTATION OF POLES
DILIP SAHA
Geological Studies Unit. Indian Statistical Institute. 203 Barrackpore Trunk Road. Calcutta - 700 035, India
(Received 4 November 1985; revised 22 December 1986)
Abstract--SPIN8 is a FORTRAN 77 program for computer-assisted rotation of bedding or foliation normal, lineations, crystallographic axes, or directions of magnetization represented as geometric poles. The algorithm is based on the transformation of the axes of the reference coordinate system. The program has the capability of handling multiple rotations of up to 400 poles.
Key Words: FORTRAN 77. Paleomagnetism, Rotation of poles, Structural geology. Transformation ol" axes, Transformation matrix.
INTRODUCTION
Geologists may be confronted with the task of rota- ting axial data from a measured coordinate system to another. To be more specific, structural geologists pre.~nt crystallographic orientation data in tcctonites or experimentally deformed rock volume as pole fig- urc diagrams or contourcd fabric diagrams. Such diagrams show the orientations in a coordinate sys- tem defined by the kinematic axes which may coincide with fold axes, stretching lineations, shear directions defined by slickensidcs, foliation planes, or principal directions of the infinitesimal or finite strain ellipsoid. Several samples from one geographic location or from adjoining rock volumes are collected and measured to analyze the geologic significance of the orientation data. Two or more sets of orientation data need to be referred to the same or equivalent coordinate systems to facilitate objective comparison. However, because of constraints in sample preparation or during mea- surements one set of raw data may refer to a co- ordinate system different from that of the other. Also, thin sections of different orientations may have to be cut from the same rock volume to test the reprodu- cibility or other statistical significance of the observed orientations. Thus arises the problem of rotating crys- tallographic orientation data. Foliation poles, line- ations, and directions of magnetization also are axial data requiring standard rotations.
Graphical methods of rotation of poles around an axis have been a traditional way of analysis (Fair- bairn, 1954; Phillips, 1971). However, the procedure can be tedious and time consuming if a large number of poles are to be handled and if more than one rotation is necessary. Noble (1964) suggested a meth- od of mathematical rotation of orientation data in- volving the rotation of independent unit vectors, A and E, to the X Z plane of the Cartesian coordinate frame so that A coincides with the Z axis. The rota- tion matrix (RM) is calculated from a functional
relationship of the direction cosines of A and E. The direction cosines of the rotated dependent vectors (poles) are determined by multiplying the original direction cosines by RM. Although Noble's method is an elegant one, its usefulness is restricted by the fact that A and E are rotated always to the ,I(Z plane. The Noble method is not amenable to situations where the rotation of poles around any axis of general orien- tation is required. Moreover, it does not take into account situations involving multiple rotations. Star- key (1970) wrote FORTRAN programs (subroutines OST3 and ROT8, written in FORTRAN IV) for the general orientation rotation of poles by solving of oblique spherical triangles. Because the subroutine OST3 has 18 references to trigonometric functions and for each pole of general orientation OST3 has to be called twice, the program is inefficient for situation involving single or multiple rotations of hundreds or thousands of poles (Monro, 1982). Alternative algorithms are presented to rotate general orientation poles efficiently. It is assumed that the orientation of the rotation axis, the amount and sense of rotation and the initial orientation of the poles to be rotated are known.
TIlE ALGORITIlM
Geometr)' t~" rotation Consider each pole as a unit vector, p,, in X - Y - Z
rectangular Cartesian coordinate space. In the re- ference hemisphere, ,Y is horizontal north, Y is hor- izontal east and Z is vertical downwards. Coordinates of the end point ofp, therefore is equal to the direction cosines ofp, with respect to At, Y, and Z.
Instead of considering the rotation of each pole around the rotation axis separately, the reference axes are rotated which is equivalent to a transformation of axes (Nye, 1957). If the initial set of axes are denoted by X, Y, and Z, and the rotated set by X', Y', and Z ' (Fig. I), then the angular relations between the axes
235
236 D. SArtA
/ / , ' -i . ' c o s ala ~ Y " /
/
Z./ Z
Figure I. Transformation of axes.
may be specified by drawing up a table of direction cosines X, a~:
"Initial '"
X Y Z
X" at1 at: al~
"Rota ted" Y" a,i a,.z a:~
Z ' a , a~: a,~. (I)
Orientation of the rotated pole in terms of its direc- tion cosines can be obtained by considering the trans- formation of vector components. Let the components of p, with respect to X, Y, Z b e p t , p : , p ~ (Fig. 2) and with respect to X', Y', Z ' be p~, p], p.~. p~ is obtained by resolving Pl, P-,, PJ along the new direction X'. Thus
p; = p! cos XA"' + p: cos YA"' + pj cos ZX' .
Hence from Equation (I)
P'l = auP= + at2p2 + al~p3 (2)
and similarly,
p',. = a:~pl + a2:P= + a,~pj (3)
P~ = a3tp! + a32P2 + a33P~. (4)
Thus if the transformation matrix, a,j and the ini- tial orientation of the poles (pt, P2, P3) are known, the final orientations (p;, p~, P'3) can be obtained easily from Equations (2-4).
i 0 P=
Zl "~X"
Y
Figure 2. Transformation of components of vector.
The transformation matr ix , a,,
The rotation axis is represented by another unit vector, R with components 1. m, n along X, Y, Z. If the components of a pole X (Ixl = I) are 1,. m, . n, before and I e. ml. n I after rotation around R. and the plane angle between R and X is zt. then from the scalar product of the two unit vectors
cos zt = II, + ram, + nn,. (5)
Because the plane angle between R and .~" remains constant during rotation
11 t- + mm r + nn t = cos zc. (6)
The angle, fl, between X and X" can be obtained by evaluating the plane triangles with sides formed by X, X" and normals drawn from the end points of X, X" on to the rotation axis (Fig. 3).
2XR: - X.Y ' : cos 0 = 2XR: from triangle X R X ' .
XX'" = 2 X R : ( I - cos0)
cos /l = I - t,it'X': from triangle X O X " (Fig. 3). Therefore.
cosf l = I - [sin:ztll - cos0 ) ] (7)
Now from the scalar product of ,It" and X'
1,1; + re, m; + n,n, = cos/I. 18)
From the properties of direction cosines
;i + ,,,~ + ,,~ = I (9)
By solving the simultaneous Equations (6). (8). and (9) I t , mr, and n; can be obtained. Thus the tinal orientation of the coordinate axes and the trans- formation matrix a,, can be obtained. Equation (9) is a second-degree one and the algebraic solution of Equations (6), (8), and (9) gives more than one set of solution if R does not coincide with one of .V, Y, Z or certain other special cases to be described next. The correct solution for our problem must satisfy the Kronekcer Delta (Nye, 1957), that is
I !
0 ,
XR= X'R OX= OX'= 1
Figure 3. Geometric relations for clockwise rotation of line around axis OR through angle 0.
Automated rotation of poles 237
aaa, , = 0 for i ~ j (10)
using d u m m y suffix notation.
Special situations of rotation Algebraic or numerical solutions o f Equations (6),
(8), and (9) to obtain a,j can be profitable only if the
~ ~,,s oo o, pol.1 f START ~ NROT number I =
" I of rotot,ons ]
rotation axis, R, is oblique to the coordinate axes. This situation is referred to as the "'general" situation. When R coincides with one of X. Y, or Z, Equations (6), (8). and (9) are identical, and one of/r. m r, or n r, must be equal to I(cos 0 = cos 0 = I). Hence, in these situations a,, = 1, i f / = j. When the amount o f rotations. 0 = 9 0 . 6 elements of a~ become zero
D0 1,1. NPTS. 1
initloI direction cosines of pole
ITR:O
ITR:ITR *1
ROT omount of rotor+on J | I Convert (AZEM, GAMA) ! J'(AZF'M.GAMA) orientation of
tO dlrechon ¢os+nes J = J rototion OEIS+ I'1 in sphericol (L.M. N) I polor co-ordinates
J
. I . J
l CALL I I CArL l neorlenl L : ~ co-ordlnOte I ,,,,,,.+ I I ,<o,.,~+ I o . . I
Convert upper I hemisphere pole I positions tO lower hemisphere
J CALL I ~ :
I s+A~ t
I Pro . . A~>--'--'~ aeori.., c*-ord * . . ~ App,, tr*n.,ormo.on I
o..+i. I :o?:,.
TRNSF2
I Process C ~ I CALL
Reorient co-ord axes I > I KDELTA
t I I Process G ~' TRNSF2
}.~,__._[ CALL }_._~ CALL Reorient co-ord a.es KDELTA TRNSF2
Figure 4. Flowchart for SPIN8. Process Fand Process G initiate special transformation matrix. For details of steps involved see program listing in Appendix.
238
Table I. Sense of rotation from subroutine KDLTA2
F i r s t so lu t ion Second so lu t ion ROT on TAPE8 on TAPE8
2 ~t • O • r~ Clockwise Ant ic lockwise
a • 0 • 0 Ant i c lockwise Clockwise
because of the orthogonality of the axes. The trans- formation matrices for rotation axis coincident with one of X. Y, Z axes are given in the Appendix.
P R O G R A M S P I N 8
A FORTRAN 77 program SPIN8 has been con- structed based on the principles of general rotation (see Fig. 4 for flowchart). The orientation of the rota- tion axis in spherical polar coordinates, intial orienta- tion of poles (direction cosines with respect to X. Y, Z
axes), amount of rotation in degrees (ROT) and the number of rotations (NROT) have to be supplied as input data. The coordinate axes have to be rotated in a sense opposite to that required tbr the poles, that is for a clockwise rotation of poles rotate the coordinate axes in an anticlockwisc sense, llowevcr, for a "general" situation solution of Equations (6). (8), and (9) input should provide two alternative sets of a, which satisfy Kronccker Delta (ROT # n n/2, integer n). The two sets of solutions correspond to clockwise and anticlockwisc rotation of poles (Table I).
In this version of the program considered here, subroutine K DLTA2 writes two alternative solutions on TAPES. The sense of rotation of the poles is as in Table I. For 0 = n n/2 (where n is an integer) the two solutions are identical and equivalent to the clockwise
D. SAHA
rotation of poles. Note that only lower hemisphere positions of the initial and final orientations of the poles are considered. If any rotated pole happens to occupy an upper hemisphere position, the diametri- cally opposite vector will give the lower hemisphere position.
The functions of different subroutines are listed in Table 2. Subroutines KDELTA and KDLTA2 are similar. When R lies on one of the coordinate planes. one of l 1. mt. and n, has two equal solutions though Equation (7) is of degree 2. Thus the number of possible combinations of the probable elements of a, that have to be tested for Kronecker Delta is < 8 (outer loop upper bound in subroutine KDLTA2). The situation is exploited in subroutine KDELTA which calls RAYLOC. Subroutine PRINT writes the direction cosines of poles after rotation on TAPE7. Note that only one set of solution is written to TAPE7. Two additional subroutines TRNSFI and TRNSF3 are provided. When the initial orientation of the poles are given in spherical polar coordinates, thcsc can bc converted to direction cosines by calling TRNSFI after an appropriate READ statement at the beginning of the program. Conversely, if the final orientation of rotated poles are necdcd in spherical polar coordinates, TRNSF3 may be called after a call to TRNSF2 towards the end of the program. Arrays corresponding to sphcrical polar coordinates have to bc dcchtrcd both in the main program and in appro- priate st|broutincs.
AN E X A M P I . E
Quartz c-axis orientations in quartz mylonites from the Loch Skerrols thrust zone. western Argyll-
FUNCTB
KDELTA
KDLTA2
RAYLOC
SWAP
TRNSFI
TRNSF2
TRNSF3
Table 2. Functions of different subroutines
Returns the cosine of the angle between the init ial and final orientation of any of the co-ordinate axes.
Returns that set of a.. which satisfies Kronecker Delta; ,J the subroutine provides for situations when R lies on one of the reference co-ordinate planes but does not coincide with any of the axes.
Returns that set of a.. which satisfies Kronecker Delta; q the subroutine provides for siutations with a general orienta- tion ,ff R, i.e., R does not coincide with any of the refer- ence co-ordinate axes or planes.
Wri:es direction cosines of rotated poles to TAPE7.
Locates the relevant elements of an array corresponding to each column of a . .
JJ
For more than one successive ro ta t ions the init ial d i rec t ion cos ines of poles a t e r ep laced by those ob ta ined a t an i n t e r m e d i a t e s t a g e a f t e r ( N R O T - I ) t h ro ta t ion , where NROT is the to ta l number of ro t a t ions neces sa ry .
Re tu rns d i r ec t ion cos ines of poles a f t e r convers ion f rom spher i ca l po lar c o - o r d i n a t e s .
Re tu rn s the f inal d i r ec t ion cos ines of poles a f t e r apply ing a t r a n s f o r m a t i o n (mu l t i p l i ca t i on by a . . ma t r ix ) on the ini t ial d i r ec t ion cos ines , q
R e t u r n s o r i e n t a t i o n of poles in spher ica l polar c o - o r d i n a t e s a f t e r convers ion f rom d i r ec t ion cosines.
Automated rotation of poles 239
Figure 5. a: Orientations of two mutually perpendicular thin sections as they are cut from oriented specimen; b: and c: Their relative orientation while U-stage measurements arc made; d: Rotations perfor- med on data obtained from perpendicular to lineation .~,:tion (8202) so as to make feasible objective comparison with data from other section.
Table 3. Example ~)I' input dala ~t (40 axes)
| N P U T D A T A
AZ88208 2
0 . 0 0.0
8PECINEN IDENTIF ICATION 0 . 6 5 8 9 6 4 8 - 0 . 7 3 1 8 5 5 0 0 . 1 7 3 6 4 8 4 0 . 4 2 2 6 1 8 9 0 . 9 0 6 3 0 7 5
- O . t 6 4 1 8 8 3 - O . 9 3 1 1 5 3 8 0 , 6 8 1 9 9 8 4 0 . ? 3 1 3 5 3 7 0 . 4 7 2 7 5 9 1 - 0 . 8 1 8 8 4 3 1 0 . 6 5 1 7 6 9 5 0 . 5 2 7 ? 9 2 4 0 . 4 5 3 4 7 4 9 0 . 8 5 2 B 6 1 5 0 . 2 7 5 6 3 7 9 0 . 5 6 1 2 6 1 &
- 0 . 1 3 3 3 0 1 8 - 0 . 4 9 7 4 8 8 4 0 . 3 7 3 1 8 1 0 0 . 9 2 3 6 5 5 6 0 . 1 8 3 5 7 5 1 0 . 8 6 3 6 5 2 9 O . 5 9 6 1 9 9 3 - O . & 6 2 1 4 6 9 0 . 8 5 4 0 6 4 4 0 . 5 4 8 1 7 8 9
- 0 . 4 7 6 2 8 8 3 - 0 . 2 3 2 3 0 1 1 - O . t S O 3 7 4 4 - O . Y 4 ? 4 2 6 8 - O . ? O 9 4 0 6 5 - 0 . 4 9 & 7 3 t 4 - 0 . 8 1 8 8 3 0 6 0 . 5 5 2 3 0 8 3 - 0 . 6 3 6 7 0 0 6 - 0 . 6 8 8 7 7 7 8 - 0 . 8 8 2 9 4 7 2 0 . 4 6 9 4 7 2 2 - 0 . 7 8 2 1 3 6 7 0 . 6 1 1 0 7 2 9 - 0 . ? 8 3 0 6 0 8 0 . 4 7 0 5 1 0 8 - 0 . 0 3 4 8 9 9 0 0 . 9 9 9 3 9 0 9
0 . 7 0 6 6 7 6 1 0 . 7 0 6 6 7 6 0 0 . 9 3 2 7 0 8 0 0 . 2 3 2 5 5 0 1
- 0 . 6 5 6 0 5 8 6 0 . 7 5 4 7 1 0 0 - 0 . 9 0 9 1 7 1 7 - 0 . 1 4 3 9 9 8 1 - 0 . 8 4 7 1 0 1 0 - 0 , 4 8 9 0 7 3 2
0 , 5 9 1 8 1 1 7 0 . 7 5 ? 4 8 4 4 - 0 . 9 5 6 3 0 4 6 0 . 8 2 2 3 7 2 5 - O . & g t & 5 5 0 - O . 6 9 1 6 g 4 7
0 . 4 0 4 1 5 1 2 - 0 . 8 6 £ 7 0 £ 6 0 . 5 1 8 3 3 9 0 - 0 . 8 2 9 5 1 6 3 0 . 4 6 9 4 7 1 9 0 . 8 8 2 9 4 7 4 0 . 7 6 1 8 4 8 0 0 . 6 3 9 2 6 6 3 0 . 2 ? 5 3 3 5 3 - 0 . 8 4 7 3 9 7 6
- 0 . 8 9 4 0 0 5 t 0 . 3 0 7 8 3 1 2 - 0 . 8 2 7 9 0 1 4 0 . 0 4 3 3 8 8 7 - 0 . $ 4 8 5 S 8 9 - 0 . 7 0 2 1 2 ~ 0 - 0 . 3 8 9 7 7 9 8 - 0 . 9 1 8 2 6 2 2 - 0 . 2 ? 0 2 9 5 7 0 . ~ 4 1 9 2 2 0
0 . 0 1 8 0 . 0 ROTATION 9 0 . 0 9 0 . 0 ROTATION
0 . 0 0 0 0 0 0 3 0 . 3 2 5 5 6 8 4 0.000ODD3 0 . 3 2 5 5 6 8 4 0 . 5 4 4 6 3 9 1 0 . 2 5 8 8 1 9 7 0 . 0 0 0 0 0 0 3 0 . 8 5 7 1 6 7 3 0 . 0 8 7 1 5 6 5 0 . 4 6 9 4 7 1 9 0 . 4 5 3 9 9 0 9 0 1908091 0 8480481 0 2756379 0 5 0 0 0 0 0 t 0 1564348 0 3583680 0 0000003 0 1218699 0.4067373 0 . 0 0 0 0 0 0 3 0 . 0 3 4 8 ? ? 6 0 . 2 7 5 6 3 7 9 0 . 0 0 0 0 0 0 3 0 . 3 9 0 7 3 1 9 0 . 2 0 7 9 1 1 7 0 . 2 7 5 6 3 7 9 0 . 0 0 0 0 0 0 3 0 . 2 0 7 9 1 1 7 0 . 2 9 2 3 7 2 2 0 . 2 0 7 9 1 1 7 0 . 0 0 0 0 0 0 3 0 . I 0 4 5 8 9 1 0 . 4 5 3 9 9 0 9 0 . 3 2 5 5 6 8 4 0 . 5 5 2 1 9 8 8 0 . 4 5 3 9 g o g 0 . 0 6 9 7 5 7 3 0 . 0 0 0 0 0 0 3 1 R
AND NO. OF ROTATZONS
C ),G 80 13 t :1-¢
24~ D. SAHA
Table 4 Examplc o f ou(put. (A) Part o f data from ~-'t ion (820~) art rolalccl around vertical axis first and then around horizontal North axis. (B) Some axial orientation data as in (A) arc rotated around oblique axis through 60
AN EXARPLE OF OUTPUT
AZG8~02 ROTATION AXIS AZ|HUTH e O.O PLUNGE •
- . 6 5 8 9 5 2 g E ÷ O O - . 1 7 3 6 4 6 4 E ÷ O 0 .7318598E+00 . 4226341E÷00 .3000000E-O& .1642039E÷OO- .3255684E÷O0 .S820107E÷O0 . 3 0 0 0 0 0 0 E - 0 6
- . 4 7 ~ 7 4 5 4 E ÷ O O - . ] ~ S S 6 8 4 E ÷ O 0 .SSITT83E+O0 .544£391E÷00 . 4 5 3 4 ~ 1 E ÷ 0 0 . 2588197E÷00 .~TS6540E÷O0 . 3 0 0 0 0 0 0 E - 0 6 .1333101E÷OO- .B571672E+O0 ,3711964E~00 . 8715650E-01 .1835895E÷00 .4694719E÷00
- . 5 9 6 1 6 8 2 E + O O - . 4 5 3 9 9 0 9 E ÷ O 0 .2S4OBO~E÷O0 .1908091E÷00 .47629~2E÷OO- .B460461E÷O0 . IS03903E÷OO- .~756379E÷O0 .TO94148E÷OO-.SOOOOOIE÷O0
- , 6 1 8 8 2 1 4 E ÷ 0 0 .1564348E÷00 .6367121E÷OO- .3583680E÷O0
- + 8 8 ~ 9 393E +00 . 3 0 0 0 0 0 0 E - 0 6 - , 7 8 2 1 8 6 4 E ÷ 0 0 .121869~E÷00 - , T 8 3 0 5 2 9 E ÷ O 0 .4067373E÷00 - . ] 4 8 8 2 2 8 E - 0 1 . 3 0 0 0 0 0 0 E - 0 6
.7066879E÷00 . ] 4 8 9 9 6 0 E - 0 1
.93271~0E÷00 .2TS6379E÷00 - . 6 5 6 0 4 5 9 E + O 0 . 3 0 0 0 0 0 0 E - 0 6
.9091741E÷OO- .3907319E~O0
.8471092E÷OO- .~O79117E÷O0
.5918243E÷00 ,27S6379E+00 - . 9 S 6 ~ 9 9 7 E ÷ 0 0 . 3 0 0 0 0 0 0 E - 0 6
. 6 9 1 6 6 6 6 E ÷ 0 0 - . 2 0 7 9 1 1 7 E ÷ 0 0 - , 4 0 4 1 1 6 T E * 0 0 - . ~ 9 2 ] T 2 E E ÷ 0 0 - . 5 1 8 3 ~ 5 2 E ÷ 0 0 - . ~ 0 7 9 1 1 7 ( * 0 0
.4£9486TE÷00 , ] 0 0 0 0 0 0 E - 0 6
.7618587E÷00 .1045291E÷00 - . E T S 3 2 1 1 E ÷ 0 0 - . 4 5 3 9 ? 0 9 E ÷ 0 0 - . 8 9 3 9 9 9 9 E ÷ 0 0 . 3 2 5 5 6 8 4 E * 0 0 - . 8~7900&E÷O0 .gS919~OE÷O0
. 5 4 8 S ? 0 & E ÷ 0 0 - . 4 5 3 9 g 0 9 E ÷ 0 0 3 8 9 7 9 g ~ E ÷ O O - . 6 9 7 g T 3 0 E - 0 1
- , 9 7 0 2 9 1 6 E ~ 0 0 .3000000E-O&
AZG8~0~ ROTATION AXIS AZIHUTH • 4 0 0 PLUNGE
- 2 3 5 6 4 5 6 E ~ 0 0 - , T T S O ~ 6 3 E ~ 0 0 .SOSSSS7E*O0 977823&E+O0 ,2090132E÷00
- 8864346E÷OO- .~473355E÷O0 9 8 4 5 S 7 2 E ÷ O O - . 6 6 0 6 9 8 9 E ° O I
- 4 3 0 0 9 0 e E ÷ 0 0 - 6238eSgE+O0 7407646E÷00 . 9890097E-01 9 2 ] 0 2 9 2 E ÷ 0 0 .2801gT4E+00
- 9 3 8 1 4 9 0 E ÷ 0 0 - . 3 4 0 5 1 7 6 E + 0 0 - 576g793E÷00 . 220946TE÷00
9537S3gE*00 . 2936581E+00 7533438E÷O0 , 5711128E÷00
- . 2 4 6 5 9 4 0 E ÷ O O - . S 6 1 9 5 5 9 E + O 0 . 8 9 3 7 0 0 1 E ÷ 0 0 .4379992E+00
- 55699gOE*O0 .599072SE÷00 - . 8 8 7 7 2 7 S E * O O - . e g o 4 3 6 6 E ÷ O 0 - , 8 6 6 1 0 4 S E ÷ 0 0 . 4498039E÷00
. 3 8 8 5 3 1 8 E - O t - . 9 4 2 0 6 5 2 E ÷ O 0 - 9 5 9 4 7 2 4 E + 0 0 .~30426gE+00
, I ~ S 2 4 4 5 E ÷ O O - . 8 6 6 8 4 9 3 E * O 0 - . 3 3 7 6 3 7 3 E - O l - . 9 3 2 9 4 5 3 E ÷ O 0
. 1 1 2 8 8 0 9 [ ÷ 0 0 - . 9 9 0 1 7 6 1 E ÷ 0 0 - . 7 9 1 0 4 4 1 E ÷ O O - . S 7 5 3 4 0 6 E ÷ O 0
. 9 7 4 7 5 3 6 E + O O - , 8 0 2 3 9 6 4 E - 0 1
. 6 9 2 4 9 6 4 E ÷ O O - . ] 6 4 0 4 6 4 E ÷ O 0 - . 2 3 6 3 ~ 7 8 E ÷ 0 0 - . 8 6 7 9 9 9 4 E ÷ 0 0
, 6 6 2 0 9 0 6 E * 0 0 - . 7 3 0 4 & 6 S E * 0 ~ . 9059836E÷OO- ,411e884E÷O0 , g 2 3 0 5 0 6 E * 0 0 . 1 4 0 2 ~ 3 9 E * 0 0 . ] I I 0 2 9 6 E ÷ O O - . 8 1 9 6 S S 1 E ÷ O 0
- , 9 8 1 ~ 6 ~ t E * 0 0 . l $ ~ S t 7 & E + O 0 - 504S373E÷OO- .61868?4E+O0 - . 3 9 9 3 8 5 0 E ÷ O O - . 7 1 6 S S 3 9 E ÷ O 0
.gBS7292E÷00 . 1638707E+00
. 9 4 3 8 4 8 8 E * O O - . 1 2 2 6 2 2 8 E ÷ O 0 - .gBOgO33E*OO- .4432SO7E÷O0
. ~ 9 9 3 6 4 1 E * O O - . 9 3 6 5 9 3 1 E + O 0 - , 5 0 ~ 3 6 B $ E * 0 0 .857~112E+00 -+g3g3gOTE~O0 +2041003E÷00 - . 9 7 6 5 4 3 3 E + 0 0 - , ~ 0 5 3 6 9 3 E + 0 0
, 3 5 9 9 ~ 4 4 E * 0 0 - B 0 1 4 5 6 1 E + 0 0
. 9 0 £ ] 0 4 4 E + 0 0
. 9311526E÷00
. 7313488E÷00
. 8188466E÷00
.52778TTE÷O0
.8528582E÷00
. 9612596E÷00
. 4974874E÷00
.92365~9E+00
. 8616516E÷00
.6621512E÷00
.9481771E~00 232~976E÷00 94942S7E÷00 4967~63E÷00 5523143E÷00 6827725E÷00 4694786E+00 6110786E÷00 4705164E+00 9993911E÷00
.7066709E÷00
.2325433E÷00
. 7 5 4 7 1 4 7 E * 0 0 1 4 3 9 9 1 5 E ÷ 0 0 , 4890671E÷00 .7574801E÷00 .2923794E÷00 .6916497E÷00 .8667096E÷00 . 8 2 9 5 2 0 t E + 0 0 , 8 8 2 9 4 4 0 E * 0 0 .&39~&08E÷00 ,8473996E÷00 .3078377E÷00 ,4339470E-01 .70~1180E÷00 .918~S94E+00 .2419~90E÷~0
1122022E-01 ] 9 1 2 ~ 7 8 E + 0 0 1621180E+00 65252S2E÷00 6644448E÷00 2636840E+00 £264724E-01 7865993E+00 £418214E-01
.32604~3E+00
.7895551E+00
.gTZ4?26E-01
.5752119E÷00
. 3571927E÷00
. 2160351E÷00
. ] 3 3 1 7 1 9 E * 0 0
. i 6 2 2 2 2 7 E + 0 0
.4825828E+00
. 3584320E÷00
. 8251899E-01
. 2 0 ? 9 2 4 1 E t 0 0
.2081679E*O0
. 6107024E÷00
. 4 ] & 7 2 2 ] E * O 0
. ] 4 2 2 2 5 4 E - 0 1
.1001?91E~00
. 3 5 8 2 1 0 9 E * 0 0
. 4 6 | 0 £ 8 | E + 0 0
. 7 8 7 2 5 5 2 E - 0 2 ,&O22196E÷O0 , 5 7 1 8 7 6 2 ( ÷ 0 0 , 3852930E-01 .3067793E~00 . 6 8 2 7 0 0 6 E * 0 0 . 1714993E+00 . 113~006E÷00 . 2887687E+00 . 6 4 7 0 6 2 4 E - 0 1 . 4775690E÷00
0 . 0 ROTATION - 90 0 NPTS • 40
a 6 0 , 0 ROTATION • £ 0 . 0 NPTS • 40
Automated rotation of poles 241
shire, Scotland were measured to analyze the relation- ship between microstructures and strain (Saha, 1984). To test the reproducibility of the observed orienta- tions two thin sections were cut from each specimen for microscopic examination--one perpendicular to the mesoscopic foliation and the lineation (e.g. SP8202), other perpendicular to the foliation but par- allel to the lineation (e,g. SP8201, Fig. 5). c-axis orientations were measured using a universal stage on a petrographic microscope. The relative orientations of the two thin sections during measurement are shown in Figure 5. For objective comparison of the data in two thin sections, measured orientations from SP8202 were rotated first through 180 ~ around the vertical axis and then through 90 around horizontal North axes. In the actual measurement 400 c-axes were measured from each thin section. For the sake of brevity an input data set for 40 axes are shown here (Table 3). The first record contains a sample identi- fication code and the number of rotations necessary --variables SPNO and NROT. Next 40 records are c-axis orientations given as direction cosines. Note that U-stage measurements give axial orientations in a different form; these are first converted to spherical polar coordinates and then to direction cosines using separate compt.ter programs (see Saha, 1984; sub- rot, tine TRNSFI can be called for conversion to direction cosines). The last two records in the input d.'tta set contain the orientation of the rotation axes (spherical polar coordinate) and the arnount of rota- tions nccessary-~variablcs AZEM, GAMA, and ROT. Output listing is given in Table 4. These contain the rote, ted axial orientations as direction cosines (Table 4A). Also, shown here is the result of rotation of the above 40 axes (Table 3) around an axis of
general orientation that is oblique to all the three reference axes (see Table 4B for orientations of rota- tion axis and rotated poles). The program is com- patible with a CYBER 174 computer operating under NOS 1.5 of Imperial College Computer Centre, Lon- don and a Mini HP 1000, E Series computer under RTE 6 operating system of National Informatics Cen- tre, Calcutta.
Acknowledgments--The program was developed during the tenure of a State Scholarship at Imperial College, London. funded by the Government of West Bengal. Facilities at Indian Statistical Institute helped towards the completion of the paper. Two anonymous reviewers are acknowledged for their comments on an earlier version. Prasanta Pramanick of National Informatics Centre, Calcutta helped in rerunning the program on a Mini HP 1000 computer.
REFERENCES
Fairbairn, H. W., 1954, Structural petrology of deformed rocks: Addision-Wesley, C~,mbridge. Massachusetts. 344p.
Monro. D. M., 1982. FORTRAN 77: Edward Arnold. Lon- don, 360p.
Noble, D. C.. 1964. Mathematical rotation of orient~,tion data: Geol. Soc. America Bull. v. 75, no. 3, p. 247 248.
Nye, J. F., 1957, Physical properties of crystals: ()xford Univ. Press, Oxford, 322p.
Phillips, F. C., 1971. The use of stereographic pro lcction in structural geology: Edward Arnold, London, 86p.
Saha. D., 1984, Deformation phases and minor intrusions in western Argyllshire: regional implications with respect to Caledoni:m tectonics: unpubl, doctoral dissertation, London Univ., 502p.
Starkey, J., 1970, A computer program to prepare orient~,- tion diagrams, /n Paulitsch, P.. ed., Experimental and natural rock deformation: Proc. of Intern. Symposium, Darmst:tdt: Springer, Berlin, p. 51 -74.
A P P E N D I X I
Program Listing
ROTATES POLES AROUNO ANY AXIS . THIS VERSION IS FOR SINGLE OR MULTIPLE ROTATION. ROTATES THE COORDINATE AXES F IRST. THEN USES A TRANSFORMATION OF COORDINATES KNOUING THE TRANSFORMATION MATRIX RELATING THE I N I T I A L AND THE FINAL ORIENTATIONS.
IF THE I N I T I A L AND THE FINAL COORDINATE AXES ARE ( X o Y , Z ) AND ( X ' , Y ' , Z ' ) RESPECTIVELY, THE TRANSFORMATION MATRIX IS GIVEN BY:
X' Y' Z'
X A ( l o l ) A ( 1 o 2 ) A ( I , ] )
Y A ( 2 , 1 1 A t e , 2 ) A ( 2 , ] )
Z A ( 3 , 1 ) A ( ] , 2 ) A ( ) , ] )
THE FOLLOUING RELATIONS HOLD BETUEEN THE ORIGINAL AND THE NEU COORDINATES OF THE SAME POINT.
242 D. $^HX
SOOS C C C
SOlO I 0 0
C C C C C
X ' " A ( l , 1 ) e X ÷ A ( 2 . 1 I e Y ÷ A ( 3 , 1 I e Z
Y° - k ( I , Z ) e X ÷ A ( 2 , 2 ) t Y * k ( 3 , 2 ) e Z
Z ' - A ( 1 , ] ) e X + A ( 2 , 3 ) e Y + A ( 3 , 3 ) e Z
FOR A GENERAL CASE(OBLIQUE ROTATION AXES) THE TRANSFORMATION MATRIX IS OBTAINED BY SOLVING THE SIMULTANEOUS EQUATIONS
LeLI + MeMi + NeNIo ALPHA
LeLF ÷ MeMF ÷ NsNF - ALPHA
L I o L F ÷ MI *HF + NIeNF - B
LFoLF + HFeMF + NFeNF - !
FOR LF,MFoNF UHICH CORRESPOND TO THE ELEMENTS IN ONE COLUMN OF THE TRANSFORMATION MATRIX. L , H , N ARE THE DIRECTION COSINES OF THE ROTATION AX IS . L I o M I , N I ARE THOSE CORRESPONDING TO THE I N I T I A L ORIENTAION OF THE COORDINATE A X I S . B IS OBTAINED BY SOLVING THE PLANE TRIANGLES CONTAINING THE I N I T I A L AND THE FINAL ORIENTAION OF THE A X I S , AND THEIR PROJECTIONS ON THE ROTATION A X I S .
ROTATION AXIS ORIENTATION IN SPHERICAL POLAR COORDINTES ( I , G A H A , A Z E H ) IN DEGREES,
FOR SPECIAL CASES UHERE ROTATION AXIS COINCIDES UITH ONE OF THE COORDINATE AXES, AND ROTATION IS THROUGH 90 DEGREES, ALL THE ELEMENTS OF A ( ] , ] ) MATRIX IS ZERO, EXCEPT THREE; SO, EASIER RULES APPLY FOR GETTING NEU POLE ORIENTAIONS.
F INAL POLE ORIENTAIONS AS DIRECTION COSINES(OR X , Y , Z OF RECTANGU- LAR CARTESIAN COORDINATES FOR UNIT VECTORS: ARRAY D C ( 3 , N P T S ) . STORED ON TAPET. SAVE TAPET AT THE END OF PROGRAM EXECUTION.
TAPE8 STORES ALTERNATIVE VALUES FOR THE ELEMENTS OF THE A ( 3 o ] ) MATRIX. ROT IN DEGREES IS THE AHOUNT OF ROTATION. AN ANTICLOCKUISE ROTATION LOOKING DOUN THE ROTATION AXIS IS RECKONED P O S I T I V E .
0 ( ROT { ] 6 0
REAL L , M o N , A Z E H o G A H A , R O T , A ( 3 , 3 ) o L P ( 4 O O ) , H P ( 4 O O ) , N P ( 4 O O ) , D C ( 3 , 4 0 0 )
READ IN I N I T I A L ORIENTAION OF POLES AND THE SPECIMEN NO. VERSION 12 TAKES DIRECTION COSINES OF POLES AS INPUT DATA
CONVRT-O.O174S32 NPTS-400
READ(S,SOOS) SPNO,NROT F O R M A T ( I X , A I O , I X , I I )
'NROT' IS THE NO. OF ROTATIONS NECESSARY
DO 100, I o I , N P T S READ(5 ,SOIO) L P ( I ) , M P ( I ) j N P ( I ) F O R M A T ( I O X , ] F I O . 7 ) CONTINUE
READ IN ROTATION AXIS ORIENTATION AND AMOUNT OF ROTATION
ITR 'O 150 I T R - I T R ÷ I
R E A D ( S , 5 0 2 0 ) AZEH,GAHA,ROT 50~0 F O R f l A T ( I X , F S . I , I X , F S . I , I X , F S . 1 )
C C COMPUTE DIRECTON COSINES OF ROTATION AXIS C
L-SZND(GAHA)~COSD(AZEH) M-S IND(GAMA)eSIND(AZEM) N-COSD(GAHA)
Automated rotation of poles 243
200
250
300
3~:0
FOLLOUING BLOCK IS FOR A SPECIAL ROTATION AXIS UHEN IT COINCIDES UITH THE HORIZONTAL NORTH; AZIMUTH " 0 GANA - 90
I F ( A Z E N . E Q . O . . A N D . C A M A . E Q . 9 0 . ) T H E N
DO 2 0 0 , 1 "1 ,NPTS A 1 8 L P ( I ) AEmRP( I ) A 3 u N P ( I ) I F ( R O T . E O . 9 0 . ) T H E N D C ( t , I ) - A I DC(2 , I ) - - A 3 D C ( 3 , I ) - A ~ ELSE D C ( 1 , 1 ) - A 1 DC(2 , I ) -COSD(ROT)eA~+COSD($O.+ROT)eA3 DC(3 , I ) - C O S O ( R O T - 9 0 . ) e A ~ ÷ C O S D ( R O T ) * A 3 END IF CONTINUE
FOLLOWING BLOCK IS FOR UHEN ROTATION AXIS IS HORIZONTAL SOUTH; AZIMUTH - 180 ;ANA - 90
ELSE I F ( A Z E N . E O . I B O . . A N O . G A H A . E Q . 9 0 . ) T H E N DO 2 5 0 , I m l , N P T S A I u L P ( I ) A E I M P ( I ) A 3 * N P ( 1 ) I F ( R O T . E Q . 9 0 . ) T H E N D C ( 1 , 1 ) - A ! O C ( 2 , I ) - A 3 D C ( 3 , I ) - - A 2 ELSE D C ( I , I ) - A 1 DC(~ , I ) -COSO(ROT)eAE÷COSO(ROT-?O. )eA3 D C ( 3 , I ) - C O S D ( R O T + 9 0 . ) e A ~ + C O S D ( R O T ) e A 3 END IF CONTINUE
FOLLOUING BLOCK IS FOR UHEN ROTATION AXIS COINCIDES UITH THE HORIZONTAL E A S T ( Y - A X I S ) . AZIMUTH • 90 GANA - 90
ELSE I F ( A Z E H . E Q . 9 0 . . A N D . G A M A . E Q . 9 0 . ) T H E N
DO 300 , I ' I , N P T S A I " L P ( | ) AE -HP(1 ) A 3 - N P ( I ) I F (ROT.EO.~O. )THEN D C ( 1 , 1 | - A 3 D C ( 2 , I ) - A Z D C ( 3 , 1 ) - - A 1 ELSE D C ( I o l ) ' C O S O ( R O T ) e A I + C O S D ( R O T - 9 0 . ) e A 3 DC(8 , I ) ' A 8 DC(3 , I ) ' C O S D ( R O T + 9 0 . ) * A I + C O S O ( R O T ) * A 3 END IF CONTINUE
FOLLOWING BLOCK IS FOR UHEN ROTATION AXIS IS HORIZONTAL UEST; AZIMUTH m 270 ~AMA m 90
ELSE I F ( A Z E N . E O . 2 7 0 . . A N D . G A N A . E O . 9 0 . ) T H E N DO 3 5 0 , I ' I , N P T S A I m L P ( I ) AE-HP(%) A 3 - N P ( I ) I F ( R O T . E Q . 9 0 . ) T H E N D C ( 1 , 1 ) 8 - A ] D C ( 2 , I ) a A 2 D C ( 3 , 1 ) - A ! ELSE D C ( I , I ) ' C O S O ( R O T ) e A I + C O S D ( R O T + 9 0 . ) e A 3 D C ( 2 , 1 ) " A 2 D C ( ] , Z ) m C O S D ( R O T - 9 0 . ) e A I + C O S D ( R O T ) e A 3 END IF CONTINUE
FOLLOU|NC BLOCK IS FOR UHEN THE ROTATION AXIS IS VERTICALLY OOUNUARDS(Z-AXIS) ; AZIMUTH - 0 GAMA - 0
24-1 D. S t̂c~
400
450
ELSE I F ( A Z E R . E Q . O . . A N O . G A M A . E G . O . ) T H E N DO 4 0 0 , I o l , N P T S A I e L P ( I ) A~=MP(1) A ] - N P ( 1 ) I F ( R O T . E O . 9 0 . ) T H E N D C ( I , I } = - A 2 D C ( 2 , I } = A I D C ( 3 , I ) - A ] ELSE BC(I,I)-COSO(ROT)eAI÷COSO(ROT+90.)eA2 D C ( 2 , I ) u C O S D ( R O T - 9 0 . ) o A ~ ÷ C O S D ( R O T ) e A Z D C ( 3 , I ) - A 3 END IF CONTINUE
FOLLOUING BLOCK IS FOR WHEN THE ROTATION AXIS IS VERTICALLY UP; AZIMUTH u 0 GAHA o 180
ELSE I F ( A Z E H . E Q . O . . A N D . G A H A . E Q . 1 8 0 . ) T H E N DO 4 5 0 , I " I , N P T S A I - L P ( I ) A 2 " M P ( I ) A ]mNP~ I ) I F ( R O T . E O . 9 0 . ) T H E N D C ( I , I ) - A ~ D C ( 2 , I ) - - A 1 D C ( 3 , I ) - A 3 ELSE O C ( | , I ) - C O S D ( R O T ) e A I + C O S O ( R O T - 9 0 . I e A 2 DC(2, I )mCOSO(ROT÷90 . )eA I÷COSD(ROT)eA2 D C ( 3 , I ) - A 3 END ZF CONTrNUE
FOLLOUING BLOCK IS FOR UHEN THE ROTATION AXIS IS ON E-U L INE BUT HAVE A PLUNCE OTHER THAN 0 OR 90 DEGREES
ELSE I F ( ( A Z E H . E O . 9 0 . , O R . A Z E H . E Q . ~ ? O . ) . A N D . ( C A M A . N E . 9 0 . . O R . G A N A . N E +O. ) )THEN
SPECIAL CASE MHEN ROTATION IS THROUGH t80 DEGREES
I F ( R O T . E Q . I S O . ) T H E N PLUNGE-90.-GAMA I F ( A Z E H . E Q . 2 7 0 . ) PLUNGE-90.+GAHA
A ( I , 1 ) - - I . A ( 2 , 1 ) ' O . A ( ] , I ) ' O . A ( I , 2 ) - O . A ( 2 , 2 ) - C O S D ( 2 . e P L U N G E ) A ( 3 , 2 ) m C O S D ( 9 0 . - ~ . e P L U N G E ) A ( I , ] ) ' O . A ( 2 , ] ) ' A ( ] , 2 ) A ( ] 0 ] ) ' C O S D ( I S O . - 2 . e P L U N G E )
ELSE
REORIENT X - A X I S
CALL FUNCTB(L ,B,ROT)
XLF-B R I - L e M R 2 - S O R T ( R I e R I - B e N e B e N - L e L + N e N ) X I H F - R I + R ~ X 2 N F ' R I - R ~ X1NF-(L-HIX1MF)/N X 2 N F - ( L - H e X 2 H F ) / N OMX-XLF
REORIENT Y - A X I S
CALL FUNCTB(M,B,ROT)
YMF-B Y N F - ( H - B e M ) / N Y I L F - S Q R T ( I . - Y M F o Y M F - Y N F e Y N F ) Y 2 L F - - Y I L F
Automated rotation of poles 245
DRYI-YRF DffiY2"YNF
REORIENT Z - A X I S
CALL FUNCTB[N,B,ROT)
ZNF-B ZNFm(N-BsN] /N ZILF-SQRT(I . -ZRFeZNF-ZNFeZNF) Z2LF=-ZILF DNZI=ZHF DNZ~-ZNF
CALL KOELTA(XLF,DHX,X1NF,X2NF,X1NF,X2NF,YtLF,YZLF,YMF,DMYI,YNF,DNY +~,Z |LF,Z2LP,ZNF,ONZ) ,ZNF,DNZZ,A)
ENO IF CALL TRNSFH2fLP,HP,NP,A,DC,NPTS)
FOLLOMING BLOCK IS FOR UHEN THE ROTATION AXIS IS ON N-S LINE BUT THE PLUNGE IS OTHER THAN 0 OR 90 DEGREES
ELSE %F((AZEH.EQ.O..OR.AZEM,EQ.I80.) ,AND.(GARA.NE.?O..OR.GANA.NE.O +.))THEN
SPECIAL CASE WHEN ROTATION IS THROUGH 180 DEGREES
IF(ROT.EQ.180.)THEN PLUNGE-?O.-GANA IF (AZEH.EQ. )80 . ) PLUNGE-?O.+GANA
A( I , t ] -COSD(2.ePLUNGE) A[2,1)mO. A ( ] , t ) -COSD(90 . -2 .ePLUNGE) A ( I , 2 ) - O . A ( 2 , 2 ] - - 1 . A ( 3 , ~ ) - O . A ( 1 , 3 ) - A ( ] , I ) A(E,31=O, A( ] ,3 ) -COSD( IBO. -2 .ePLUNGE)
ELSE
REOR|ENT X-AXIS
CALL FUNCTB(L,B,ROT)
XLF-B XNF- (L -BeL) /N XINFmSORT(I.-XLFeXLF-XNFeXNF) X~HF--X1NF DHXIsXLF OffiX2"XNF
REORIENT Y-AXXS
CALL FUNCTB(N,B,ROT)
YNF-B RI-HeN R~-SORT(RIoRI-BeLeBoL+LeL-NoN) Y1NF-RI+R2 Y2NF-RI-R~ Y1LF=(H-NeYINF)/L YELF-(R-NeY2NF)/L DHY-YNF
REORIENT Z-AXIS
CALL FUNCTB(N,B,ROT]
ZNF-B ZLFo(N-BeN)/L ZIHF-SORT(I.-ZLFeZLF-ZNF~ZNF) Z2MF--ZIHF DHZIJZLF DMZ2=ZNF
CALL KDELTA(XLF,DNXI,XIHF,X2HF,XNF,DHX2,YILF,Y2LF,YNF,DHY,Y1NF,Y2N +F,ZLFoDMZI,ZINF,Z2RF,ZNF,ORZZ,A]
246 D. S,,.-~
END IF CALL TRMSFR2(LP,MP,NP,A,DC,NPTS)
FOLLOUING BLOCK IS FOR UHEN THE ROTATION AXIS IS ON THE PRIHIT|VE BUT THE AZIMUTH IS NOT ON E-U OR N-S AXIS
ELSE IF(GARA,EO.90. .AND.(AZEM.NE.O..OR.AZEM.NE.90.) )THEN
REORIENT X-AXIS
CALL FUNCTB(L,B,ROT)
XLF'B XMF-(L-BeL) /H XlNF-SORTfI . -XLFIXLF-XMFoXMF) X~NF--XINF DHXI-XLF DMX2-XMF
REORIENT Y-AXIS
CALL FUNCTB(H,B,ROT)
YNF-B YLF- (N-BeN) /L YINF-SQRT(I.-YLFeYLF-YNFeYHF) Y2NF--YINF DHY1-YLF DHY2-YMF
REORIENT Z-AXIS
CALL FUNCTB(N,B,ROT)
ZNF'B RI 'NeL R2~SQRT(RleRI-BeHeBeM÷ReM-NeN) ZILF-RI+R2 Z2LF-RI-R2 Z t M F ' ( N - L e Z l L F ) / M Z2HF-(N-LeZ2LF) /H OMZ'ZNF
CALL KDELTA(XLF,DHXI,XRF,DMX~,XINF,X~NF,YLF,DMYI,YHF,OMY20YINF,Y~N +F,Z1LF,Z2LFoZIRF.Z~MF,ZNF,OMZ,A)
CALL TRNSFM2(LP,MP,NP,A,DCoNPTS)
FOLLOUING BLOCK IS FOR UHEN THE ROTATION AXIS IS INCLINED TO ALL THE THREE COORDINATE AXES
ELSE
REORIENT X-AXIS
CALL FUNCTB(L,B,ROT)
XLF'B D o l . - L * L A I ' L - B e L E - - ~ . e N * A I F o A I e A I - M o M * ( I . - B s B ) H-SORT(EeE-4.eDeF) X I N F - ( H - E ) / ( 2 . e D ) X 2 N F - - ( H + E ) / ( 2 . e D ) X I H F - ( A I - N e X I N F ) / H X2HF-(AZ-NeX2NF)/N DHX'XLF
REORIENT Y-AXIS
CALL FUNCTB(M,B,ROT)
YMFuB D-1.-HeM AI~H-BgM Eu -2 .eLeA I F - A I * A I - N e N 0 ( I . - B I B ) H-SORT(E~E-4.eOeF) Y I L F o ( H - E ) / ( ~ . e D ) Y 2 L F o - ( H + E ) / ( 2 . e D )
Automated rotation of poles
C C C
C C C C
C
Y I N F - ( A I - L e Y I L F ) / N Y2NFm(AI-LeY2LF)/N DNY-YMF
REORIENT Z-AXIS
CALL FUNCTB(N,B,ROT)
ZNF-S Dul . -NeN AI IN-BeN Eo-2 .eLeA I F -A IeA I -MeMe(1 . -BaB) H'SORT(EeE-4.eDeF) Z I L F - ( H - E ) / ( ~ . e D ) Z 2 L F " - ( H + E ) / ( 2 . e D ) Z1MF- (A I -LeZ ILF ) /M Z2NF" (A I -L *Z2LF) /H DHZ'ZNF
CALL KDLTA2(XLF,YNF,ZNF,XINF,XINF,X~MF,X2NF,Y1LF.YINF,Y2LF.Y2NF,ZI +LF,ZIRF,Z2LF,Z2RF,A,LP,MP,NP,DC,NPTS,SPNO,AZEH,GARA°ROT)
CALL TRNSFH2(LP,HP,NP,A,DC°NPTS) END IF
CONVERT UPPER HEMISPHERE POLE POSITIONS TO LOUER HEMISPHERE
800
DO 800 , I o l ,NPTS I F ( D C ( ] 0 I ) . G E . O . O ) GO TO SO0 D C ( I . I ) ' - D C ( I , I ) DC(2, I ) - - D C ( E , I ) O C ( ] , l ) ' - O C ( ] , l ) CONTINUE
IF(NROT.GE.2) CALL SMAP(DC,LP,MP,NP,NPTS) IF( ITR.LT.NROT) GO TO tSO NOUNIT-7 CALL PRINT(SPNO,ROT,AZEM,GAMA,DC,NPTS,NOUNIT)
STOP END
HERE COHES THE SUBROUTINES
SUBROUTINE FUNCTB(X,B,ROT)
GET THE ANGLE(UHOSE COSINE IS 8) BETUEEN THE IN IT IAL AND THE FINAL ORIENTATION OF ANY OF THE COORDINATE AXES. SOLVE THE TRIANGLES CONTAINING THE I N I T I A L VECTOR, THE FINAL VECTOR AND THEIR ELEVATIONS FROfl THE ROTATION AXIS
B I 'S IN(ACOS(X) ) XSQ'BI*S le( I -COSD(ROT)) D ' I . - X S O RETURN END
SUBROUTINE PRINT(SPNO,ROT,AZEH,GAHA,DC,NPTS,NOUNIT)
PRINTS ROTATION AXIS ORIENTATION, AMOUNT OF ROTATION AND THE FINAL DIRECTION COSINES OF THE POLES. ANGLES IN DEGREES.
REAL ROT,AZEH,GAHA,PLUNGE,DC(],NPTS)
PLUNGE-$O.-GAHA URITE(NOUNIT,8010) SPNO
8010 FORHAT(1HS/IHI,A1Q) URITE(NOUNZT,8020) AZEN,PLUNGE,ROT,NPTS
80EO FORHAT(1HO,24H ROTATION AXIS AZIMUTH ~,F6.1,]X,SHPLUNGE o , F S . I , ] X , +IOHROTATION *,F6.1o3X,6HNPTS o , I 4 )
DO I O 0 , I o I , N P T S URITE(NOUNIT,80]O) ( D C ( J , I ) , J - 1 , 3 )
8030 FORHAT( lX ,3E I ] .T ) 100 CONTINUE
RETURN END
C C
247
248 D. SAHA
SUBROUTINE K D E L T A ( X I , X 2 , X 3 , X 4 , X S , X & , Y I , Y 2 , Y ] , Y 4 , Y S , Y 6 , Z 1 , Z 2 ° Z ] . Z 4 , ÷ Z S , Z 6 , A F )
SELECT THAT SET OF VALUES FOR A F ( 3 , 3 ) , THE TRANSFORNATION MATRIX UHICH SAT ISF |ES THE KRONECKER DELTA
REAL X ( 6 ) , Y ( K ) , Z ( & ) , A F ( 3 , ] ) , S U R N O U , S U M A G O
X ( 1 ) B X I X ( 2 ) - X 2 X ( 3 ) - X 3 X ( 4 ) u X 4 X ( S ) - X 5 X ( b ) - X 6 Y ( 1 ) - Y I Y ( 2 ) ~ Y 2 y ( ] ) u y ] Y ( 4 ) - Y 4 Y ( S ) ' Y S Y ( 6 ) u Y 6 Z ( 1 ) - Z 1 Z ( 2 ) ' Z 2 Z ( 3 ) - Z 3 Z ( 4 ) - Z 4 Z ( S ) - Z S Z ( 6 ) - Z 6
SUHAG0-0.001
TUO OUTER DO LOOP'S ARE FOR ONE OF THE 8 POSSIBLE COHBXNATIONS FOR THE THREE PAIRS OF SOLUTIONS FOR ( A ( I , I ) , I m t , ~ ) , CORRESPONDING TO X ' , NEU ORIENTATION OF X - A X I S
N I X - 2 I F ( X ( 1 ) . E O . X ( 2 ) ) N I X - I DO I O 0 0 , I X - I , N I X
DO 9 0 0 , J X m l , 4 A I - X ( I X ) CALL RAYLOC(JX ,NJX1 ,NJX2) B I - X ( N J X I ) C I - X ( N J X 2 )
NEXT TWO DO LOOP'S ARE FOR THE 8 POSSIBLE CONBINATIONS FOR THE 3 PAIRS OF SOLUTIONS FOR ( A ( I , 2 ) ° I - I , ] ) , CORRESPONDING TO Y ' , THE NEW ORIENTATION OF Y - A X I S
N IYo2 I F ( Y ( I ) . E Q . Y ( 2 ) ) N I Y o !
DO 8 0 0 , I Y o l , N I Y DO 7 0 0 , J Y m t , 4
A B ' Y ( I Y ) CALL R A Y L O C ( J Y , N J Y I , N J Y 2 ) B 2 - Y ( N J Y I ) C 2 - Y ( N J Y 2 )
NEXT TWO O0 LOOP'S ARE FOR THE 8 POSSIBLE COHSINATIONS FOR THE ] PATRS OF SOLUTIONS FOR ( A ( I , ] ) , I . 1 , ] ) , CORRESPONDING TO Z ' , THE NEW ORIENTATION OF Z - A X I S
N I Z ' 2 I F ( Z ( I ) . E O . Z ( 2 ) ) N I Z ' ]
DO 6 0 0 , 1 Z o I , N I Z DO 5 0 0 , J Z - I , 4
A 3 " Z ( I Z ) CALL RAYLOC(~Z ,NJZ1 ,NJZ2) B 3 - Z ( N J Z I ) C ] - Z ( N J Z 2 )
S I - A B S ( A l e B I * A 2 e B e + A 3 e B 3 ) S 2 - A B S ( A I o C I + A 2 1 C 2 + A 3 o C 3 ) S ] - A B S ( B l e C l e B 2 e C 2 e B ] * C 3 ) S 4 - A B S ( A l e A 2 e B l e B 2 + C I e C 2 ) S S - A B S ( A I o A ] + B | e B ] + C l e C ] ) S 6 - A B S ( A 2 e A ] ÷ B 2 e B ] + C 2 Q C ] )
SUMNOUaSt+S~÷S]+S4+SS+S6
IF(SUHNOU.GE.SUHA¢O) GO TO 500 SUMAGO-SUHNOW A F ( I , I ) o A I A F ( 2 , 1 ) - B I
Automated rotadon of poles
A F ( ] . I ) ' C t A F ( I , 2 ) e A ~ A F ( £ , 2 ) m B 2 A F ( ] , E ) ' C 2 A F ( | , ] ) o A ] A F ( 2 ° ] ) I B ]
A F ( ] , ] ) m C ] 500 CONTINUE 600 CONT|NUE 700 CONTINUE 800 CONTINUE 900 CONTINUE
1000 CONT|NUE RETURN END
SUBROUTINE R A Y L O C ( N I , N 2 , N ] )
FINDS LOCATION ON ARRAY X,Y ,OR Z IN SUBROUTINE KDELTA
I F ( N I . E O . I ) T H E N N2 -3 N 3 - 5
ELSE I F ( N I . E Q . ~ ) T H E N N2-4 N3 "5
ELSE I F ( N 1 . E Q . 3 ) T H E N N2 -3 N ] - 6
ELSE N2-4 N3"6
END IF RETURN END
SUBROUTINE T R N S F R I ( A Z E R , G A M A , A I ° A ~ ° A ] )
CONVERTS SPHERICAL POLAR COORDINATES(I .GAMA,AZEH) TO RECTANGULAR CARTESIAN C O O R D I N A T E S ( A I ° A B , A 3 / X , Y , Z ) AZIMUTH IS MEASURED CLOCKUISE POSIT IVE FROM HORIZONTAL NORTH NORTH IS ÷X, EAST IS ÷Y AND OOUNMARDS VERTICAL IS +Z AZEH, GARA IN RAOIANS GAHA m P I / B - PLUNGE DIRECTION COSINES ARE EQUAL TO ( X ° Y ° Z ) COORDINATE FOR UNIT VECTORS
P lmSIN(GAHA) PB"COS(CARA) P ] " S I N ( A Z E H ) P4"COS(AZEH) A I - P l e P 4 A B - P I o P ] A3 "P2 RETURN END
SUBROUTINE TRNSFN2(LPoNP,NP,A,DC,NPTS)
TRANSFORHS COORDINATES OF A SET OF POLES KNOWING THE I N I T I A L AND THE F INAL ORIENTATIONS OF THE COORDINATE FRANE; A F I N I T E ROTATION AROUND ANY L INE IS THE GEOMETRIC OPERATION
TRANSFORHATION NATRIX IS IN ARRAY A ( ] , 3 ) ARRAY D C ( ] . N P T S ) CONTAIN THE DIRECTION COSINES OF THE F INAL POLES AZ(NPTS) AND G(NPTS) CONTAIN AZIf lUTH ANO GARA VALUES FOR I N I T I A L ORIENTATION OF THE POLES; AZ AND G IN RAOIANS.
REAL LP(NPTS),NP(NPTS),NP(NPTS),A(3,3),DCi],NPTS)
DO 100 I - I ° N P T S X - L P ( 1 ) Y - H P ( I ) Z - N P ( I )
O C ( I , i ) - A ( I , I ) e X + A ( 2 . I ) o Y + A ( ] . I ) o Z D C ( 2 , I ) - A ( I , 2 ) e X ÷ A ( 2 , 2 ) e Y ÷ A ( ] . 2 ) t Z D C ( 3 , I ) - A ( I , ] ) e X ÷ A ( B , ] ) e Y ÷ A ( ] . ] ) o Z
249
250
100 CONTINUE RETURN END
D. S,'LHA
SUBROUTZNE TRNSFH3(DC,CONVRT,NPTS,AZEH,GAHA)
CONVERT DIRECTION COSINES TO AZINUTH AND GAMA GANA - P I / 2 - PLUNGE
REAL DC(],NPTS),AZEN(NPTS),GAMA(HPTS)
DO 300, ImI ,NPTS A ' D C ( I , I ) B ' D C ( Z , [ ! C-DC(3, I !
;F(C.GE.O.O) GO TO 100 Am-A B ' - B C--C
I00 CONTINUE GAHA(Z)~ACOS(C) I F ( G A H A ( I ) . G T . . I E - O ] . A N D . G A N A ( I ) . L T . ( I B O . e C O N V R T - . I E - O ] ) ) T H E N BADDY-A/SIN(GANA(]) ) OX-BADDY-1. | F ( D X . G T . . I E - 0 9 ) 8TOP IF (OX.GT .O .O .AHD.DX.LE . . IE -09 ) AZEH( ; ) 'O .O IF (DX.LE.O.O) AZEN(X)IACOS(BADOY) ZF(B.LT.O.O) AZEH(Z)I360.OeCONVRT-AZEM(Z) ELSE AZEN( I ) -O.O END IF
]00 CONTINUE
RETURN END
RETURN END
SUBROUTINE KDLTA2(XLF,YNF,ZNF,XINF,XINF,X2MF,X2NF,YILF,YINF,Y2LF,Y2NF +2NF,Z1LF,ZIHF,Z2LF,ZZMF,AF,LP,MP,NP,DC,NPTS,SPNO,AZEN,GAHA,ROT)
CHECK UHICH OF THE ALTERNATIVE SOLUTIONS FOR AF(3 ,3 ) SAT]SPIES TItE KRONECKER DELTA.
REAL AF(3,3),DC(3,NPTS),LP(NPTS),NP(NPTS),NP(NPTS)
SUMAGO'.IE-O]
DO 5 0 0 , I ' 1 , 8 AImXLF B2mYHF C3aZNF
NESTED BLOCK I F ' S
I F ( I . L E . 4 ) T H E N DI "X IHF CIaXINF
I F ( I . L E . 8 ) T H E N A~-YILF C2"YINF
]F ( | .EQ.1 )THEH A3-Z ILF B ] -Z INF
ELSE A]aZ2LF D3-Z~MF
END IF ELSE
A2-Y2LF C2aY2NF
ZF( | .EQ.J)THEN A]mZILF B3-Z l f lF
Automatedro~tion of poles
ELSE A3"ZELF B]-zEMF
END IF END IF
ELSE BI-X2MF CIBX2NF
I F ( I . E O . 5 . O R . ] . E O $)THEN A2oY1LF C2-YIHF
IF ( I .EQ.5 )THEN A ] - Z I L F B3BZIMF
ELSE A]-ZELF B]-Z2MF
END IF
ELSE AE~YeLF C2oYENF
IF ( I .EO.7 )THEN A] -Z1LF B]mZIMF
ELSE A] -Z2LF B3-Z2HF
END IF END IF
END IF S loASS(AIoSI÷AEeS~+A]eS~) S2.ABS(A leCI+A2tC2+A]eC3) S ]oABS(SIeCI*B2eC~÷B]*C3) S4.ABS(AleA2÷BIeBE+CleCE) SS,ADS(AIoA] *B lm9]+CIeC3) SS.ABS(A2eA]÷B2eB]+C2eC3)
SUMNOU,SI+SE+S]÷S4+SS+S6
IF(SUMNOU.GT.SUMAGO) ; 0 TO 500 8UHAGO-SUMNOU NOUNIT"8
C URITEINOUNIT,7010) UR|TE(NOUNXT,7020) A I , A ~ , A ] UR|TE(NOUNZT,70]O) B I , B E , S ] WRITE(NOUN|T,7040) C I , C 2 , C ] URZTE(NOUNZT,70SO) 8UMNOU
C A F ( I 0 1 ) ' A ! A F ( 2 , 1 ) o S I AF(3, I)~C1 A F ( I , E ) ' A ~ AF(E ,E ) °B2 AF(30£)oC2 A F ( I 0 ] ) ' A ] A F ( 2 0 ] ) o B ] A F ( ] ° ] ) m C ]
7OlD FORMAT(ISX,2HX',I2X,EHY',I2XoEHZ',2(/)) 7020 FORRAT(&X°IHX,lXoEI3.7,EX,EI].7°EX,EI3.7,2(/)) 7 0 ] 0 FDRRAT(&X,EHY mEI] .7eEX,EI ] .7,EX,EI ] .7°2( / ) ) 7040 FORHAT(SX,EHZ ,E I ] .7 ,£X,E13.7°EX,E l ] .7 ,2( / ) ) 7050 FORNAT(2(/),5X02&HSUM OF ALL DOT PRODUCTS o , E I 3 . 7 , 5 ( / ) )
C CALL TRNSFN2(LP,MP,NP,AF,DC,NPTS) CALL PRINT(SPNO,ROT,AZEH,GAMA,DC,NPTS,NOUNIT)
500 CONTINUE C
RETURN END
SUBROUTrNE SUAP(DC,LP,HP,NP,NPTS)
REPLACE CURRENT DIRECTION COSINES OF POLES(LP,HP,NP) BY THOSE OF THE ROTATED POLES AFTER ONE OR MORE ROTAT|ON, IN CASE OF MULTI- ROTATZON
REAL OC(] ,NPTS),LP(NPTS),NP(NPTS),NP(NPTS)
DO IO0, lmI ,NPTS L P ( I ) ' O C ( I , I )
251
252
H P t I ) - O C I Z o | ) N P I I ) = O C ( 3 ° | )
100 CONTINUE C
RETURN END
D. SAX-~
R o n + X
APPENDIX 2
T r a n s f o r m a t i o n M a t r i c e s f o r S p e c i a l S i t u a t i o n s
R o n - X
I 0 0 1
o o,0 0
0
R o n + Y
c o , 0 + 0 )
cos 0
0
0)
R o n + Z
cos 0
0
cos 0
0 0 I
0 is the amount of rotation. 360" > 0 > O.
L e t c o s a = a, cosB = b General situation:
For x axis, from Equation (8)
where
0
R o n - Y
0
cos 0
0
cos( cos 0
cos 0 0 cos - 0
0 I 0
c o s ( 2 + O) O cosO
R o n - Z
o,0 ,,
0 0 I
S o l u t i o n o f S i m u h a n e o u s E q u a t i o n s ( 6 ) , ( 8 ) . ( 9 )
1 # O , m # O,n # O.
~ b ,
- - B +. (B" - 4 A C ) II"
2A n I =
A - I - fl , B = 2 n ( b l - a ) , C = (a - bl) 2 - m2(I - b:)0
(a - bl) - nnl. m I =
m
m I ~ b ,
- B + (B: - 4 A C ) ~t2
2A
For Y axis. from Equation (8)
where
t : , .
A . . I - m ~ . B = 21(bin -- a ) . C = (a - bin) 2 - n:(I - b"),
( a - 6 ~ ) - Ill . n / =
n
(A l a-c)
(A2a-c)
Automated rotation of poles 253
For Z axis. from Equation (8)
I I
/'If m b .
- B _ (B: - 4.4C) ~: 2.4
where
A = I-n: . B = 21(bn - a) . C = (a - bn)" - ""(1 - b: ) .
(a - bn) - IIr
" J m
R on XY plane but not coinciding with X or Y:
n = 0 .1 # 0 . " :~ 0.
For X axis.
For Y axis.
l:or Z axis.
R o n X Z p l a n e b u t R # X o r R #, Z:
For X axis.
I t = b.
a - bl m f "
n t = (! - I ~ ' - ' ~ ) ' : .
ml = b,
it -- b m 11 = I
n f = ( I - I 7 - , , , ~ "
n/ := b.
I I = ill +_ ( . : 1 : - h : ' : + " : a : ) ~ :.
I - II!. PPI! ~
tll
I # O . n # O . m = O.
I = h ,
a - bl n[
n
,I,, -- (12 - //' - h i ) ' : .
(A3a-c)
(A4a-c)
(A5a -c)
(A6a ¢)
(ATa-c)
For Y axis
For Z axis.
R o n Y Z p l a n e b u t R # Y o r R # Z:
For X axis.
"/ = b ,
n l = a n + ( a : n : - b : l 2 + I : - a: ) ~:.
I
n I = h ,
I I = ( a - b n ) / I .
"1 = (I - I~ - n~)' :.
I = 0 . " # O . n # O.
H'lf ~ b .
n! = (a - b ' ) / n .
(A8a--c)
(A9a-c)
F o r Y axis .
rn I = a m *_. (a:m: - bn z + n z - a2) ' ' : ,
For Z axis,
D. SAHA
t, = ~t - ~ + , , ~ ) ' : .
t/ = b.
n~ = (a - m m t ) / n .
n 1 = b
m f = (a -- b n ) / m .
t/ = (~ - . ,~ - .~)':.
( A I 0 a - c )
(A 11 a -c )
(A 12a-c)