Graphics Reference
In-Depth Information
3 rotation/scale submatrix followed by a
translation. Most of the error accumulation occurs because of the operations resulting frommultiplying
the x- , y- , and z -coordinates of the point by the 3
An affine transformation matrix can be viewed as a 3
3 submatrix. Therefore, the following round-off
error example will focus on the errors that accumulate as a result of rotations.
Consider the case of the moon orbiting the earth. For the sake of simplicity, the assumption is that
the center of the earth is at the origin and, initially, the moon data are defined with the moon's center at
the origin. The moon data are first transformed to an initial position relative to the earth, for example
( r , 0, 0) (see Figure 2.10 ). There are three approaches that could be taken to animate the rotation of the
moon around the earth, and these will be used to illustrate various effects of round-off error.
The first approach is, for each frame of the animation, to apply a delta z -axis transformation matrix
to the moon's points, in which each delta represents the angle it moves in one frame time (see
Figure 2.11 ) . Round-off errors will accumulate in the world space object points. Points that began
as coplanar will no longer be coplanar. This can have undesirable effects, especially in display algo-
rithms that linearly interpolate values to render a surface.
y
y
x
x
( r , 0, 0)
z
z
FIGURE 2.10
Translation of moon to its initial position on the x-axis.
y
for each point P of the moon {
P
3
= P
}
R dz = y-axis rotation of 5 degrees
repeat until (done) {
for each point P
2
of the moon {
1
P
= R dz *P
x
}
record a frame of the animation
}
( r , 0, 0)
z
FIGURE 2.11
Rotation by applying incremental rotation matrices to points.
 
Search WWH ::




Custom Search