14.3 Point to Triang le 649
point inside D.If∇Q =(Q
s
, Q
t
),whereQ
s
and Q
t
are the partial derivatives of Q,
it must be that (0, −1)
.
∇Q(0, 1) and (1, −1)
.
∇Q(0, 1) cannot both be negative.
The two vectors (0, −1) and (1, −1) are directions for the edges s = 0 and s + t = 1,
respectively. The choice of edge s +t = 1ors = 0 can be made based on the signs
of (0, −1)
.
∇Q(0, 1) and (1, −1)
.
∇Q(0, 1). The same type of argument applies in
region 6. In region 4, the two quantities whose signs determine which edge contains
the minimum are (1, 0)
.
∇Q(0, 0) and (0, 1)
.
∇(0, 0).
The implementation of the algorithm is designed so that at most one floating-
point division is used when computing the minimum distance and corresponding
closest points. Moreover, the division