Stratified Reconstruction
Briefing Stratified Lecture
Exercises
Again we propose an experimental exercise, trying to visualise the projective, affine and Euclidean transformations in stratified reconstruction.
Step 1. Visualisation Code.
- Make a simple 3D figure which you can use for testing. A tetrahedron is too simple. You need some straight angles. A simple house with rectangular walls and sloped roof will do. Remember to define the corners in 3D, rather than in a 2D perspective drawing.
- Retrieve your code to display the 3D figure from the first weeks of the module. Display your figure. Does it look right?
- Make an ideal projection of your house (divide each point by its \(z\) co-ordinate), and display this in 2D. Does it look right?
Step 2. Euclidean transformation.
- Define a Euclidean transformation, e.g. rotation by \(45^\circ\) around the \(y\)-axis and translation by \((0,-5,0)\).
- Apply the transformation to the 3D figure.
- Using the code from Step 1, plot both the resulting 3D figure, and its projection in 2D. Do the plots look right?
- Try a few other transformations. Try to find one which gives a comprehensible impression in 2D.
Step 3. Affine transformation.
- Define an affine transformation of the form \[\begin{bmatrix} K&0\\0&1 \end{bmatrix}\] where \(K\) is upper triangular and has determinant 1.
- Apply the affine transformation after the Euclidean transformation to the 3D figure. Use a Euclidean transformation which looks good in 2D.
- Using the code from Step 1, plot both the resulting 3D figure, and its projection in 2D. Do the plots look right?
- Try a few other transformations and compare the results.
Step 4. Projective transformation.
- Define a projective transformation of the form \[\begin{bmatrix} I&v^T\\0&v_4 \end{bmatrix}\] for some vector \(v^T\) and scalar \(v_4\).
- Apply the projective transformation after the affine and Euclidean transformations to the 3D figure.
- Using the code from Step 1, plot both the resulting 3D figure, and its projection in 2D. Do the plots look right?
- Try a few other transformations and compare the results.
Step 5. Reflection
- Compare your plots to Figure 6.10 in the textbook. Do you get something similar? Can you get something similar by varying the transformations?
- Compare the exercise to Table 6.1 in the textbook. What do you find?