CS488 - Introduction to Computer Graphics - Lecture 6

Window Coordinates

On the view plane

Viewport Coordinates

On the viewplane

Normalized Device Coordinates

Normalized viewport coordinates

Real Device Coordinates

Normalized device coordinates scaled to the size of the picture on the screen

Exercise for the reader

Why bother with normalized device coordinates? What extra value to they give you?


Renaissance artists had rules of thumb for how a satisfying picture is frame; i.e., how the viewport should be chosen. They were right, and they were smarter than you about images. Follow their rules when you want to make a picture that people will admire.

Geometry - Affine Spaces

Euclidean Spaces

Poorly named: Euclid had only a compass; Euclidean spaces have a ruler and a protractor.

Cartesian Spaces

Euclid allows us to position vectors with respect to a general basis, but

A Cartesian space adds a standard frame so that we can position points and compare coordinates.

Matrix Representations of Affine Transformations

Write a general point in terms of its coordinates in two different orthonormal frames.

Example. Find ( x', y', z' )

  1. x' i' + y' j' + z' k' = x i + y j + z k + (O - O')

    Notice that this is a vector equation.

    0 = 0 in the fourth coordinate comes for free!

  2. Then, taking the dot product with i':

    x' = x (i . i') + y (j . i') + z (k . i') + (O - O') . i'

    This is an ordinary linear algebraic equation.

    There are two other equations like this one, produced by j' and k'.

    See how nice it is to have an orthonormal frame!

  3. Write the three algebraic equations together as a matrix multiplication.

    / \ / \ / \

    | i.i' j.i' k.i' (O-O').i' | | x | | x' |

    | i.j' j.j' k.j' (O-O').j' | | y | = | y' |

    | i.k' j.k' k.k' (O-O').k' | | z | | z' |

    \ / \ / \ /

  4. What about the fourth row of the matrix?

    Points have the fourth coordinate 1, vectors 0.

    Regardless of the coordinates points should stay points, vectors vectors.

    Only the row ( 0, 0, 0, 1 ) makes it happen.

This method works fine when we know the frames in terms of each other - or in terms of another frame - but not when we want to derive the matrix from a geometrical manipulation.

Another Take on Affine Transformations

`The longest journey starts with but a single step.' What does this mean?

Is there a small set of simple transformations from which all transformations can be constructed?


Translation is simple; rotation about a basis vector is simple. But rotation about an arbitrary axis is complex.

Construct rotation about an aribitrary axis from translation and rotation about a basis vector.

  1. Translate the axis of rotation so that it passes through the origin.
  2. Rotate the axis of rotation to coincide with the z-axis.
  3. Rotate by the specified angle.
  4. Undo the axis rotation.
  5. Undo the translation.

Notice the structure, Tinv S T, which occurs over and over again.

Return to: