Graphics Reference
In-Depth Information
14.5.2
Implicit Surfaces and Quadrics
This section takes a brief look at implicitly defined surfaces. Specifically, we want to
study the solution of a polynomial equation of the form
(
) = 0
fxyz
,,
.
(14.16)
The reader should review the general comments on implicit tilers at the end of Section
14.3.
The important special case of quadric surfaces is often dealt with separately. If all
one wants to do is to render them, then [Bloo97] presents a scan line-rendering algo-
rithm. We already know the types of quadrics that exist. See Section 3.7 in [AgoM05].
Assume that the quadric is represented in world homogeneous coordinates by the
equation
x
y
z
w
Ê
ˆ
Á
Á
Á
˜
˜
˜
(
) = (
)
hxyzw
,,,
x y z w Q
= 0
.
(14.17)
Ë
¯
Recall the discussion of the graphics coordinate system pipeline in Chapter 4. By com-
posing the homogeneous version of the world-to-camera coordinates transformation
(equation (4.4)) with the homogeneous camera-to-clip coordinates transformation
(equation (4.10)), we get a transformation M, which maps from homogeneous world
coordinates to homogeneous clip coordinates. It follows that the equation for the
quadric in homogeneous clip coordinates is
x
y
z
w
¢
¢
¢
Ê
ˆ
Á
Á
Á
˜
˜
˜
(
)
xyzwQ
¢
¢
¢
¢
*
=
0
(14.18)
Ë
¯
¢
where Q* = M -1 Q(M -1 ) T . Actually, since M -1 differs from the adjoint, adj(M), by a con-
stant (the reciprocal of the determinant of M), we may simplify equation (14.18) and
assume that
adj M Q adj M T
()
()
Q
* =
in that equation. For a pixel on the screen with integer coordinates (x,y) let (x s ,y s ) Œ
[0,1] ¥ [0,1] denote its normalized device coordinates. With this notation, we can now
describe the algorithm for rendering the quadric defined by equation (14.17).
For each pixel (x,y), we solve the following quadratic equation in z:
x
y
z
Ê
ˆ
s
Á
Á
Á
˜
˜
˜
s
(
)
xyz Q
1
*
=
0
.
(14.19)
ss
Ë
¯
1
Search WWH ::




Custom Search