CHAPTER 4
322
Graphics
C
2
D
2
v
D
1
C
1
u
FIGURE 4.20
Coordinate mapping from a unit square to a four-sided Coons patch
Two surfaces can be described that are linear interpolations between the bound-
ary curves. Along the
u
axis, the surface
S
C
is defined by
S
C
(
u
,
v
) =
(
1
–
v
) ×
C
1
(
u
) +
v
×
C
2
(
u
)
Along the
v
axis, the surface
S
D
is given by
S
D
(
u
,
v
) =
(
1
–
u
) ×
D
1
(
v
) +
u
×
D
2
(
v
)
A third surface is the bilinear interpolation of the four corners:
S
B
(
u
,
v
) =
(
1
–
v
) × [ (
1
–
u
) ×
C
1
(
0
) +
u
×
C
1
(
1
)
]
+
v
× [ (
1
–
u
) ×
C
2
(
0
) +
u
×
C
2
(
1
)
]
The coordinate mapping for the shading is given by the surface
S,
defined as
S
=
S
C
+
S
D
–
S
B
This defines the geometry of each patch. A patch mesh is constructed from a
sequence of one or more such colored patches.
Patches can sometimes appear to fold over on themselves—for example, if a
boundary curve intersects itself. As the value of parameter
u
or
v
increases in
parameter space, the location of the corresponding pixels in device space may
change direction so that new pixels are mapped onto previous pixels already