![]() |
![]() |
![]() |
Home | | Syllabus | |
Assignments | |
Documentation
Solution to Assignment 4
Problem 1a: A 3D spinning box
C code for solution to 3D spinning box problem Problem 1b: A user-interfaced controlled spinning box
C code for solution to 3D box with user interface problem Problem 1c: Approximating a cylinder.
C code for approximation to a cylinder. Problem 2: Gimbal Lock We can show that the two sets of rotation cause identical results by multiplying the matrices together and showing the result is the same. Multiplying the first set of matrices yields:
Multiplying the second set of matrices yields:
The results are the same. Therefore the two sets of rotations will cause identical overall rotation of the object. Problem 3: Yaw, Pitch and Roll When we compute the transformation of the viewer in an airplane according to Yaw, Pitch and Roll, we need to accomplish 4 steps.
Moving the viewer in these 4 transformations is equivalent to moving object frame in the opposite direction:
M = Rz(-theta3)*Rx(-theta2)*Ry(-theta1)*T(0, 0, -d) Note that the order in which we perform the yaw, pitch and roll transformations matters. You will get different matrices for different ordering of the rotation transformations. In this problem you were given the order as yaw, pitch and then roll. Here is the matrix equation for the above transformations:
Here is the result for the order of multiplication shown above:
Home | | Syllabus | | Assignments | | Documentation
Constance Royden--croyden@mathcs.holycross.edu
|