Lecture 2
Lecture 2
Lecture 2
Matlab Code :
Result :
aP = [-1, 1.732, 0] T
Note : The rotation matrix that rotates vectors by 30 deg about z-axis is same as
the rotation
matrix that describes a frame rotated 30 deg about z-axis relative to the reference
frame. Hence
the rotational matrix is same as previous question
A. Position vector = P1
Rotation matrix for rotating vector by 30 deg = Rz = aRb
New position vector = P2 = Rz * P1
Matlab Code :
Result :
P2 = [-1, 1.732, 0] T
Q3. The coordinates of point P in frame (1) is [3, 2, 1] T, the position vector P
is
rotated about z-axis by 45-deg. Find the coordinates of point Q the new position of
point P
A. Position of point P = P
Rotation matrix for rotating vector by 30 deg = Rz
Position of point Q = Q = Rz * P
Matlab Code :
Result :
Q = [0.7071, 3.5355, 1] T
Q4. The coordinates of point P in frame (B) is [3, 7, 0, 1] T, frame (B) which is
rotated relative to frame (A) about z-axis by 30-deg, translated by 10 units in x-
axis,
5 units in y-axis, 10 units in x-axis. Find coordinates of point P with respect to
frame
(A).
Matlab Code :
Result :
aP = [9.098, 12.562, 0, 1] T
A. Position of point P = P1
Translation and rotational matrix = T
New position of point P = P2 = T * P1
Matlab Code :
Result :
P2 = [9.098, 12.562, 0, 1] T
Q6. Frame (B) that is rotated relative to frame (A) about z-axis by 30 deg and
translated 4 units in x-axis, 3 units in y-axis, Thus we have a description of
transformation matrix for B with respect to A. Find transformation matrix for A
with
respect to B.
Matlab Code :
Result :
bTa = [ 0.866 0.5 0 -4.9641; -0.5 0.866 0 -0.5981; 0 0 1 0; 0 0 0 1]
Q7. Frame (2) is rotated with respect to frame (1) about the x-axis by an angle of
60-deg. The position of the origin of frame (2) as seen from frame (1) is 1D2 = [7,
5, 7]T . Obtain the transformation matrix 1T2
, which describes frame (2) relative to frame(1). Also find the description of
point P in frame (1). If 2P = [2, 4, 6 ]T
.
A. Transformation matrix for frame (2) with respect to frame (1) = T12
Result :
Pnew = [9 1.8308 13.4641 1 ]T
Q8. Consider a point P in space. Determine the new location of this point after
rotating it by an angle of 45 deg. About z-axis and then translating -1 unit along
x-axis
and -2 units along z-axis. What will be the equivalent frame transformation for
this
vector transformation.
A. Transformation matrix = T
Coordinate for point P =P
Equivalent transformation = E =T * P
Matlab Code :
Q10. The position of a frame after fixed angle rotation is known. Determine the
different fixed angles of rotation.
P =
0.3536 −0.5732 0.7392
0.6124 0.7392 0.2803
0.7071 0.3536 0.6124
α = atan2 ( ൗ
r21
cos β
,ൗ
r11
cos β
)
γ = atan2 ( ൗ
r32
cos β
,ൗ
r33
cos β
)
Matlab Code :
Result :
B = -44.9978 deg A = 59.9978 deg Y = 30.0022 deg
Q11. The coordinates of point P with respect to a moving coordinate frame are
given as P = [0.5, 0.8, 1.3, 1 ]T . What are the coordinates of P with respect to
fixed
coordinate frame, if the moving frame is rotated by 90 deg about z-axis of the
fixed
frame ?
Result :
P1 = [-0.8; 0.5; 1.3; 1 ]