Graphics Reference
In-Depth Information
8.4 The normal vector to a surface
Surface normals are required in lighting calculations and are easily calculated from polygonal
models. In this section we explore how normals are computed for continuous surfaces. We
begin by transposing Eq. (8.5) into a 3D context to describe a surface:
F xyz
=
0
If we make small changes to F using dx dy, and dz, and remain on the surface, F xyz must
still equal zero, and dF
=
0. Therefore,
F
x dx
F
y dy
F
z dz
=
+
+
=
dF
0
(8.7)
But Eq. (8.7) can be written as vector scalar product:
F
x i
z k
F
y j
F
dF
=
+
+
·
dx i
+
dy j
+
dz k
=
0
Similarly,
dx i
+
dy j
+
dz k
must be the tangent vector to the surface and, consequently,
F
x i
z k
F
y j
F
+
+
must be the normal vector to the surface.
But say a surface is described in a parametric form such as a Bézier surface: then an alternative
form is available. For example, let the position vector of a point on a surface be given by
=
=
+
+
r
r uv
x uv i
y uv j
z uv k
as shown in Fig. 8.4.
Y
r
∂v
n
r
∂u
r
Z
X
Figure 8.4.
 
Search WWH ::




Custom Search