- Available 2016-10-12
- Due 2016-10-25, 17:30 in your coursegit assignments repo
- See the assignment notes for the required repository structure.
Deliverables
Write your answers in Q{1,2,3}.{txt,odt,pdf}. You are welcome (and encouraged!) to use LaTeX, but please compile your TeX to PDF to save the TA trouble. You are encouraged, but not required, to provide sketches to help explain your answer.
Part 1. Flying a camera
Suppose you have a 4x4 matrix B
defining a camera coordinate
system. The first 3 columns of B
are mutually orthogonal unit
vectors definining a left-handed coordinate system. The last column is
a (homogeneous) point defining the eye point.
- Show how to factor
B
into the product of a (homogenous) translation and an orthogonal matrix. - Use the results of of the previous part to show how to compute the
view matrix
B^(-1)
- Suppose you have
B^(-1)
and want to change the eyepoint, keeping the axes of the eye coordinate system the same. What is the smallest number of scalar arithmetic operations (additions, subtraction, multiplication, division) you need to update the view matrix for the new eyepoint.
Part 2. Multiple projections
Let P(d)
and O(d)
be the 4x4 matrices for perspective and
orthographic projection onto the plane z=d
. For each of the
following pairs of projections, find a single matrix to carry out both
projections in the order specified, and explain your answer in
geometric terms.
First apply
P(d)
thenO(d)
.First apply
O(d)
thenP(d)
.First apply
P(d)
thenO(0)
.First apply
O(0)
thenP(d)
.
3. Depth Transform
We have noticed several inconvenient side effects of the depth transformation
z' = n + f + nf/z
It would be much nicer to have a transformation P
such that
P [x,y,z,1]ᵀ = [wx/z, wy/z, wz, w]ᵀ
I.e. that did the required transformation to x
and y
, and left z
alone. To avoid worries about dividing by zero, suppose we have the
alternate form
P [x,y,z,w]ᵀ = [λx, λy, λz², λwz]ᵀ (1)
Let
B
be the standard coordinate system (basis) in (homogeneous) matrix form. Use(1)
to computePB
, then solve forP
.Show that this value of
P
does not perform the required transformation for all column vectors[x,y,z,w]ᵀ
, i.e. that it does not faithfully impliment(1)