![]() |
|
Nearly all discussions of three-dimensional computer graphics
start with the graphics pipeline. However, the notion of "the graphics
pipeline" is somewhat of a misnomer. Seldom are any two depictions, or
implementations for that matter, of a graphics pipeline identical.
The basic idea is that the processing of information in 3-dimensional computer
graphics occurs in a series of steps, where each step generates results for
the successive one.
The process starts with models that are usually described by three-dimensional
coordinates (x, y, z). The models usually define either solids or the boundaries
of object. Each of these modeling styles has a name. In solid modeling the primitives
used to describe an object have volume. In boundary representations, or B-reps,
the objects are defined in terms of their skins, or two-dimensional surfaces
that approximate the interfaces between different material types. These models
are usually defined within there own coordinate system, with their own origins
and scales of measurement.
The first step in the rendering pipeline is to transform an object from it's
own model space to a common coordinate space, called world space, in which all
objects, light sources, and the viewer coexist. This step is called the modeling
transformation stage.
The next step is an optimization. In the trivial rejection stage of the rendering
pipeline we attempt to eliminate any objects that cannot possibly be seen. This
removes some of the scene description from further processing by the rest of
the pipeline.
Next we illuminate the objects that might possibly be seen giving them colors
based on their material properties and the light sources in the scene. There
are many different ways to accomplish this illumination depending the shading
model and the surface model.
After illumination we perform another change in coordinate system that maps
the viewing position to the origin, and the viewing plane to some desired position.
This viewing transformation moves objects from world space into eye space.
Next we perform clipping of the scene's objects within a three dimensional viewing
volume called a viewing frustum. This step totally eliminates any objects (and
pieces of objects) that are not visible in the image.
In the next step we actually project the objects into two-dimensions. The transformations
is from eye-space to screen-space.
In the rasterization step we scan-convert the object into pixels. This will
often involve interpolating parameters as we go along.
But we already know how to do this (This what we've been talking about thus far in the semester).
To summarize, almost every step in the rendering pipeline involves a change of coordinate systems. This transformation process is central to understanding three-dimensional computer graphics.
and it will be our starting point for our venture into 3-D computer graphics. By the way, it all about math.... but I warned you!
![]() |
|
![]() |
|
![]() |
|
![]() |
|
|
view frustum is a semi-infinite pyramid, although the
base is usually rectangular rather than square because the screen isn't square.
In practice, however, it is normal to chop off the frustum near the point and
somewhere further down towards the base. The view frustum defines what parts
of the 3D world can be seen from the camera position when looking through a
window (usually the screen). Here's a little piccie to help clarify things a
bit :You can define a frustum using the view rectangle, the camera origin and
the near- and far-plane distances from the camera origin. This information can
then be used to make the top, bottom, left, right, near and far planes. All
the planes have their normals facing into the frustum (by convention, doesn't
matter so long as they either all point inwards or all point outwards).
Once you have these 6 planes it is easy to determine whether any given point
is inside the frustum or not - you just make sure it is above every plane. You
just test it against each plane in turn, rejecting the point if it fails at
any point in the test.
![]() |
|
This is not the only possible representation. You may encounter textbooks that consider points as row vectors. What is most important is that you use a consistent representation.
Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions by adding offsets to their coordinates, as shown in the following vector equation.
The following figure shows the effect of translating a teapot.
Rotations in three-dimensions are considerably more complicated than two-dimensional rotations. In general, rotations are specified by a rotation axis and an angle. In two-dimensions there is only one choice of a rotation axis that leaves points in the plane.
If the thumb points towards the positif axis (in the same direction as the vector that define the rotation) then positif rotations follow the other finger of the right hand.
A special case : Positive rotation directions about the coordinate axes are counterclockwise, when looking toward the origin from a positive coordinate position on each axis
Around the x axis | Around the y axis | Around the z axis |
---|---|---|
![]() |
![]() |
![]() |
...
In Java 3D no way to define directly a general rotation, but at least, it is possible to easily define a rotation around an axis that goes trough the origin
In case you missed it, a rotation matrix is a special orthogonal matrix. By definition, a special orthogonal matrix has these properties:
Where AT is the transpose of A and I is the identity matrix, and
This isn't really very helpful. A more helpful set of properties is provided by Michael E. Pique in Graphics Gems (Glassner, Academic Press, 1990):
Properties 1 and 2 are useful for verifying that a matrix is a rotation matrix. If you manipulate a matrix, and you want to make sure that you still have a rotation matrix, sum the squares of any row or column. If the result is not 1, then you have surely done something wrong. If the result is 1, chances are you are on the right track.
Property 3 is useful for forward motion.
(§ Homonym: sheer)
1. A machine that cuts sheet metal by passing a blade through it.
2. (Physics) A deformation of an object in which parallel planes remain parallel
but are shifted in a direction parallel to themselves; "the shear changed
the quadrilateral into a parallelogram."
ROLL |
PITCH |
YAW |
Rotation around the front-to-back |
Rotation around the side-to-side axis |
Rotation around the vertical axis |
![]() |
![]() |
![]() |
written by Ian Humphrey <I.Humphrey@sct.gu.edu.au>
The Euler Angles (a, b, g) comprise a parametrisation
of arbitrary rotations in three-dimensional space.
The description in this document coincides with that of "Angular Momentum
in Quantum Mechanics" by Edmonds and "Angular Momentum" by Brink
and Satchler, two standard texts in the field.
The effect of Euler angle rotation R=(a, b, g) is briefly
as follows:
1. We start in frame S with cartesian axes, x, y and z.
2. We begin with a positive (anti-clockwise) rotation of magnitude a about the
z axis of S. The resulting frame is called S'.
3. Next a positive rotation of magnitude b about the y' axis of frame S'. The
resulting frame is called S''.
4. Finally a positive rotation of magnitude g about the z'' axis of S''. The
resulting frame is called S'''.
STEP 1:
|
STEP 2:
|
STEP 3:
|
![]() |
![]() |
![]() |
... The Truth is Out There ...
rotation are not commutative (has anybody proved the contrary ?)
what will happen in a real plane ?
... that depend of the way you want to define the pitch...