Rotation of a data vector by components
Given the attitude of a rotational axis and the amount and sense of rotation, generate general
equations that calculate the new attitude of a data vector from its original attitude. All attitudes
(orientations) are specified as azimuth and plunge, but are converted to directional components
in the orthogonal coordinate system of:
positive X = due east, horizontal
positive Y = due north, horizontal
positive Z = vertical toward center of the earth
The magnitudes of any of the given vectors is of no consequence, only the attitude of the
rotated vector is required. Input data has a blue background color, while answers have a light
red background.
This worsheet is designed to solve structural geology problems that consist of rotations of orientation
data. Input is in azimuth and plunge (decimal degrees).
( atan ( 1.0) 4.0)
Deg2Rad Deg2Rad 0.017
180.0
Input the azimuth and plunge (decimal degrees) of the rotation axis below:
AxisAz 247 AxisPl 8
a sin ( AxisAz Deg2Rad ) sin [ Deg2Rad ( 90 AxisPl) ] a 0.912 a, b, and c are the
directional
b cos ( AxisAz Deg2Rad ) sin [ Deg2Rad ( 90 AxisPl) ] b 0.387 components of the
c cos [ Deg2Rad ( 90 AxisPl) ] c 0.139 rotation
axis
Input the azimuth and plunge (decimal degrees) of the data below:
DataAz 110 DataPl 45
x sin ( DataAz Deg2Rad ) sin [ Deg2Rad ( 90 DataPl) ] x 0.664 x, y, and z are the
directional
y cos ( DataAz Deg2Rad ) sin [ Deg2Rad ( 90 DataPl) ] y 0.242 components of the
z cos [ Deg2Rad ( 90 DataPl) ] z 0.707 data vector.
Input the amount and sense or rotation (degrees) below:
Rotation 270
r is the rotation value
in radians; positive
r Rotation Deg2Rad r 4.712 values rotate the
data vector
The tprod() function simply calculates a quantity that is common anticlockwise as
to the rot_X(), rot_Y(), and rot_Z() functions below. viewed downplunge
of the rotation axis.
tprod ( x1 y1 z1 x2 y2 z2 r) ( x1 x2 y1 y2 z1 z2) ( 1 cos ( r) )
The functions rot_X(), rot_Y(), and rot_Z() return the directional components of the rotated data
vector given the components of the original data vector (x1,y1,z1), the components of the rotation
axis (x2,y2,z2), and the amount or rotation (r). The "tp" argument is calculated by the tprod()
function.
rot_X ( x1 y1 z1 x2 y2 z2 r tp) cos ( r) x1 tp x2 [ sin ( r) ( y2 z1 z2 y1) ]
rot_Y ( x1 y1 z1 x2 y2 z2 r tp) cos ( r) y1 tp y2 [ sin ( r) ( x2 z1 z2 x1) ]
rot_Z ( x1 y1 z1 x2 y2 z2 r tp) cos ( r) z1 tp z2 [ sin ( r) ( x2 y1 y2 x1) ]
t1 tprod ( x y z a b c r)
R_X rot_X ( x y z a b c r t1) R_X 0.617
R_Y rot_Y ( x y z a b c r t1) R_Y 0.577 R_X, R_Y, and R_Z are the directional
components of the rotated data vector.
R_Z rot_Z ( x y z a b c r t1) R_Z 0.535
R_X
RD R_Y if R_Z 0.0 0.617
R_Z
RD 0.577 If R_Z < 0.0, the rotated vector plots in
R_X 0.535 the upper hemisphere and must be
reflected back to the lower
R_Y otherwise hemisphere.
R_Z
Validity check:
The sum of squares of the directional
components must equal 1.0 for a valid vector.
RD0 2
RD1 RD2 1
2 2
acos RD0
128.101
Deg2Rad , , and are the directional angles
of the rotated data vector in degrees.
acos RD1
54.763
Deg2Rad
acos RD2
57.647
Deg2Rad
atan2 RD0 RD1
azimuth 450 if RD0 0.0 RD1 0.0
Deg2Rad
atan2 RD0 RD1
90 otherwise
Deg2Rad
azimuth 313.077 The azimuth of the rotated
vector in degrees.
acos RD2
plunge 90
Deg2Rad
plunge 32.353
The plunge of the rotated vector in
degrees.
Graphical Plot
The below calculations are used to plot an equal-area or equal-angle lower-hemisphere
stereographic projection plot of the position of the original data vector, the rotation axis, the position
of the rotated data vector, and the path of the rotation.
"t" is a counter that increments the number of steps used to trace the rotation path. "x_cent",
"y_cent", and "radius_size" are the center of the projection and radius size of the projection
respectively.
tmax 360 The "tmax" varible controls the number of steps used to draw the rotation path.
t 0 1 tmax x_cent 0.0 y_cent 0.0 radius_size 3.75
The functions cx(t) and cy(t) trace the outline (primitive) of the stereographic projection.
cx ( t) x_cent cos 360
t
Deg2Rad radius_size
tmax
cy ( t) y_cent sin 360
t
Deg2Rad radius_size
EqualArea 0 EqualAngle 1
tmax
Set the variable "projection_flag" equal to "EqualArea" or "EqualAngle" to control the type of
projection for the graphical plot.
projection_flag EqualArea
The below sections calculate the polar coordinates of the original data, the rotation axis, and the
rotated data vector position based on the above calculated solution. Variables ending in "_mag" are
the magnitude of the plotted position relative to the center of the diagram. The azimuth is already
calculated above. The x,y position of the elements of the problem are stored in the variables ending
with "_x" and "_y".
acos z
2 sin
data_mag
radius_size if projection_flag = EqualArea
2
tan
acos ( z)
radius_size otherwise
2
data_x x_cent sin ( DataAz Deg2Rad ) data_mag data_x 1.907
data_y y_cent cos ( DataAz Deg2Rad ) data_mag data_y 0.694
acos c
2 sin
axis_mag
radius_size if projection_flag = EqualArea
2
tan
acos ( c)
radius_size otherwise
2
axis_x x_cent sin ( AxisAz Deg2Rad ) axis_mag axis_x 3.203
axis_y y_cent cos ( AxisAz Deg2Rad ) axis_mag axis_y 1.359
acos R_Z
2 sin
rot_mag
radius_size if projection_flag = EqualArea
2
tan
acos ( R_Z ) radius_size otherwise
2
rotated_x x_cent sin ( azimuth Deg2Rad ) rot_mag rotated_x 1.868
rotated_y y_cent cos ( azimuth Deg2Rad ) rot_mag rotated_y 1.746
The function rot(t) returns the rotation angle as a function of the iteration variable "t" that steps
through 0..180 steps. Thus the total rotation is divided into 180 steps to trace the rotation path.
t
rot ( t) Rotation Deg2Rad
tmax
The function tdot(t) returns a quantity needed for the calculation of rx(), ry), and rz() as a function of
the rotation stepping variable "t". The flag(t) variable flags whether or not the rotated vector plots in
the lower hemisphere- if it is positive it plots in the lower hemisphere.
tdot ( t) tprod ( x y z a b c rot ( t) )
flag ( t) sign ( rot_Z ( x y z a b c rot ( t) tdot ( t) ) )
The functions rx(t), ry(t), and rz(t) return the directional cosines of the rotated data vector position as a
function of the stepping variable "t". The components are adjusted to always plot in the lower
hemisphere of the stereographic plot.
rx ( t) rot_X ( x y z a b c rot ( t) tdot ( t) ) flag ( t)
ry ( t) rot_Y ( x y z a b c rot ( t) tdot ( t) ) flag ( t)
rz ( t) rot_Z ( x y z a b c rot ( t) tdot ( t) ) flag ( t)
The functions rotaz(t) and rotmag(t) return the polar coordinates of the rotation path on the graphical
plot as a function of the stepping variable "t". Both functions return values as degrees.
atan2 ( rx ( t) ry ( t) )
rotaz ( t) 450 if rx ( t) 0.0 ry ( t) 0.0
Deg2Rad
atan2 ( rx ( t) ry ( t) )
90 otherwise
Deg2Rad
acos rz ( t)
2 sin
rotmag ( t)
radius_size if projection_flag = 0
2
tan
acos rz ( t) radius_size otherwise
2
The functions pl_x(t) and pl_y(t) return the x,y coordinates of the rotation path on the graphical
diagram as a function of the "t" stepping variable.
pl_x ( t) x_cent sin ( rotaz ( t) Deg2Rad ) rotmag ( t)
pl_y ( t) y_cent cos ( rotaz ( t) Deg2Rad ) rotmag ( t)
N
4
Original data: blue cross
Axis: green cross
0 Rotated: magenta cross
4
4 2 0 2 4