CS488 - Introduction to Computer Graphics - Lecture 5
Comments and Questions
Euclidean Space
An affine space plus a metric, d(P1, P2), that has translational
invariance
- Metric is symmetric by definition
- also non-negative and obeying the triangle inequality.
- Translational symmetry means: d(P1, P2) = d(P1 +2 v, P2 +2 v).
The familiar dot product (defined on vectors, Why?) is your baby.
- d(P1, P2) = ( P1 -2 P2 ) /dot ( P1
-2 P2 ) = | P1 -2 P2 |
- This gives you what Euclid was able to do with a compass, and more.
The dot product also defines ahgles between vectors.
- cos(s) = v1 \dot v2 / (|v1| |v2|),
- s is the angle between v1 and v2.
- This is part of the `more' we got than compass.
Cartesian Space
A Euclidean space plus a (usually orthonormal) frame.
- The frame is ( i, j, k, O ).
- ( i, j, k ) is a set of basis vectors with two properties
- orthogonality: i \dot j = j \dot k = k \dot i = 0.
- normalization: |i| = |j| = |k| = 1.
Using the frame (often called `standard' or `distinguished' ) we can write
uniquely
- any vector as v =1 ( x, y, z, 0 )
\dot ( i, j, k, O ) =1 x *1 i +1
y *1 j +1 z *1
k, and
- any point as P =2 ( x, y, z, 1 )
\dot ( i, j, k, O ) =2 ( x *1 i +1
y *1 j +1 z *1
k ) +2 O
- ( x, y, z, 1 ) and ( x, y, z, 0 ) are called the `coordinates' of the
point or vector.
- Note that coordinates are defined wrt a frame: without a specific frame
they are meaningless.
Properties of Affine Spaces
Affine Combinations
Affine Transformations
The general idea is that we apply a transformation to a point to position
it.
There are two ways to see this process
One Point, Two Frames
- P = x i + y j + z k + O = x' i' + y' j' + z' k' + O'
- Express the second frame in terms of the first.
i' = aii i + aij j + aik k, etc.
O' = O + bi i + bj j + bk k.
- Then collect terms.
Two Points, One Frame
Matrix Representations of Affine Transformations
View Transformations
Return to the rendering pipeline.
- Several objects positioned in the world
- Frames view
- Each object has its own frame, in terms of which its points
have coordinates.
- Express all object coordinates in a common frame, the modelling
frame.
- Express the modelling frame in terms of the world frame.
- Get coordinates of each object in the world frame.
- Points view
- Each object starts at the origin of the world frame in a
standard orientation, with point coordinates in the world
frame.
- Move the object to the correct position and orientation by
transforming its coordinates.
- The two views give exactly the same result, with slightly different
mathematics, which will be explained later.
- Viewer's eye looks at the world. Possibilities
- Put the eye in the world frame.
- Do high school geometry.
- What a drag!
- Associate a frame, the view frame, with the viewer.
- Find object coordinates in the view frame.
- Drop a coordinate, because you defined the view frame
cleverly.
What happened?
- Point Po in object coordinates.
- Transform Po by T1 to get it into world coordinates: Pw = T1( Po )
- Transform Pw by V to get it into view coordinates: Pv = V( Pw ) = V(
T1( Po ) ) = V T1 Po.
To move the point transform it again.
- Pw = T2 T1 Po
- Pv = V T2 T1 Po
Return to: