CS488 - Introduction to Computer Graphics - Lecture 7


Affine Transformations in Practice

Rigid Transformations

Rotation

To specify a rotation you need

Three basic rotations encompass all rotations geometrical demonstration

  1. about the x-axis
  2. about the y-axis
  3. about the z-axis

You know the basic matrix for 2D rotation

/                \
|  cos(t)  sin(t) |
|                 |
| -sin(t)  cos(t) |
\                /

Generalize it into three dimensions

But only two are independent

Non-rigid transformations

Scaling

Three interpretations

  1. Change of units
  2. Change of frame
  3. Movement of point

Others


Clipping

What is it?

Representations of Lines

  1. Parametric: y = mx + b, z = nx + c
  2. Implicit, L(t) = P + t v = P + t ( Q - P )

Clip a Point against a Half-space.

Representation of a Half-space.

Calculate d = ( R - P ) \dot n

Clip a Line Segment to a Half-space.

The line segment

Test if each of R and S are inside. Calculate

  1. d(R) = ( R - P ) \dot n
  2. d(S) = ( S - P ) \dot n

There are three cases

  1. Both inside: keep the segment as is.
  2. Both outside: discard the segment.
  3. One inside, one outside: the segment crosses the boundary of the half-space.

Clip a Line Segment to a Rectangular Parallellopiped

Straightforward, BUT what if the line segment crosses a corner?

Two Good Examination Questions


Return to: