~~NOTOC~~
===== Homework 04 - Rigid motion as a coordinate transformation =====
=== Motivation ===
In this task, we will study the effect of motion (rotation and translation) on a //rigid body//. The term **rigid** can be understood as the relative positions of individual parts do not change by this motion.
To study this, we construct a very simple rigid body r1 consisting of only two points r1={O, X}. To describe the relative position of these two points, we introduce a coordinate system (O, β) with the origin at one of these points - O and standard basis β. The second point X can thus be expressed as a vector Xβ in this coordinate system. Xβ = [1,2,3] in (O, β).
Now we apply the given motion on this rigid body represented by the coordinate system. That will result in a new coordinate system (O', β'). We construct a new rigid body r2 ={O', Y} where Y has the same relative pose as X in r1. Yβ' = [1,2,3] in (O', β').
Finally, we apply the motion on point X denoting it as Z.
What are the coordinates of point Z?
----
=== Task ===
Use MATLAB to solve the following problems related to rigid motion. Use different colors to display your results.
- Simulate the rigid motion with matrix R and translation o_{\beta'} prescribed by Equation 5.4 in {{http://cmp.felk.cvut.cz/cmp/courses/PRO/Lecture/PRO-Lecture.pdf|PRO-Lecture.pdf}}.
% approximate rotation
R = [0.8047 -0.5059 -0.3106
0.3106 0.8047 -0.5059
0.5059 0.3106 0.8047];
% less approximate rotation
[U,D,V] = svd(R);
R = U*V';
% translation o_β'
o = [1;1;1];
- Basis β equals the standard basis σ. O=[0; 0; 0]
- Find the coordinates of vectors of β' in β and vice versa.
- Plot vectors of β and β' in the standard basis, list the numeric values.
- Plot coordinate systems (O, β) and (O', β'). i.e. plot the basic vectors as bound vectors originating from points O and O', respectively, list the numeric values.
- Plot the bound vector Xβ = [1;2;3] representing point X in (0, β), list the numeric values.
- Plot the position vector in (O', β') of point Y represented in (O', β') by vector Yβ' = [1;2;3], list the numeric values.
- Consider point Z, where X moves by the motion given above. Plot the bound vector representing the point Z w.r.t. (O, β), list the numeric values.
=== Upload ===
Upload via the [[https://cw.felk.cvut.cz/upload/|course ware]] the zip archive ''hw04.zip'' containing
- hw04.pdf report file describing your solution with all figures
- hw04.m MATLAB source code, which generates the results and figures for the report
- all your additional MATLAB files required by hw04.m