Graphics Reference
In-Depth Information
Figure 13.5.
The fat line for a Bézier curve.
2
2
ax
++=
by
c
0
,
a
+=
b
1
,
(13.8)
and define
(
) =++
dxy
,
ax by c
.
(13.9)
It is easy to see that d(x,y) is just the signed distance from a point (x,y) to L because
n = (a,b) is a unit normal vector for L and d(x,y) = ((x,y) - p 0 ) • n. Let d i = d(x i ,y i ) and
set
{
}
d
=
min
d
,
d
,...,
d
,
min
01
n
{
}
d
=
max
d
,
d
,...,
d
.
max
01
n
The convex hull property of Bézier curves implies that the curve is contained in the
fat line defined by the two lines L 1 and L 2 , which are parallel to L and a distance of
d min and d max from L , respectively. Actually, as the example in Figure 13.5 indicates,
we can do better. The curve is contained in a thinner fat line and the lines L 1 and L 2
can be moved closer to L . The thinnest fat line parallel to L is really determined by
the minimum and maximum of d(u), the signed distance from p(u) to L . The poly-
nomial d(u) can be explicitly computed in the quadratic and cubic curve case and one
can use the following improved values for d min and d max :
d
d
Ó
˛
Ó
˛
1
1
d
=
min
0
,
and
d
=
max
0
,
Quadratic Curve.
min
max
2
2
Cubic Curve. Although precise values can be computed in this case also, the for-
mulas are complicated and the extra computational effort is not justified. Instead
the following approximations are suggested in [SedN90]:
If d 1 d 2 > 0, then let
3
4
3
4
{
}
{
}
d
=
min
0
,
d
,
d
and
d
=
max
0
,
d
,
d
.
min
12
max
12
Search WWH ::




Custom Search