
A.6 Minimization 877
Theideaistobracket the minimum by three points (t
0
, f(t
0
)), (t
m
, f(t
m
)), and
(t
1
, f(t
1
)) for t
min
≤t
0
<t
m
<t
1
≤t
max
,wheref(t
m
)<f(t
0
) and f(t
m
)<f(t
1
). This
means the function must decrease for some values of t ∈[t
0
, t
m
]and must increase for
some values of t ∈ [t
m
, t
1
]. This guarantees that f has a local minimum somewhere
in [t
0
, t
1
]. Brent’s method attempts to narrow in on the local minimum, much like the
bisection method narrows in on the root of a function (see Section A.5).
The following is a variation of what is described for Brent’s method in Press
et al. (1988). The three bracketing points are fit with a parabola, p(t).Thevertex
of the parabola is guaranteed to lie within (t
0
, t
1
).Letf
0
= f(t
0
), f
m
= f(t
m
), and
f
1
= f(t
1
). The vertex of the parabola occurs at t
v
∈ (t
0
, t
1
) and can be shown to be
t
v
= t
m
−
1
2
(t
1
− t
0
)
2
(f
0
− f
m
) − (t
0
− t
m
)
2
(f
1
− f
m
)
(t
1
− t
m
)(f
0
− f
m
) − (t
0
− t
m
)(f
1
− f
m
)
The function is evaluated there, f
v
= f(t
v
).Ift
v
<t
m
, then the new bracket is
(t
0
, f
0
), (t
v
, f
v
), and (t
m
, f
m
).Ift
v
>t
m
, then the new bracket is (t
m
, f
m
), (t
v
, f
v
), and
(t
1
, f
1
).Ift
v
= t
m
, the bracket cannot be updated in a simple way. Moreover, it is not
sufficient to terminate the iteration here, as it is simple to construct an example where
the three samples form an isosceles triangle whose vertex on the axis of symmetry is
the parabola vertex, but the global minimum is far away from that vertex. One simple
heuristic is to use the midpoint of one of the half-intervals, say, t
b
= (t
0
+ t
m
)/2,
evaluate f
b
= f(t
b
), and compare to f
m
.Iff
b
>f
m
, then the new bracket is (t
b
, f
b
),
(t
m
, f
m
), and (t
1
, f
1
).Iff
b
<f
m
, then the new bracket is (t
0
, f
0
), (t
b
, f
b
), and (t
m
, f
m
).
If f
b
=f
m
, the other half-interval can be bisected and the same tests repeated. If that
also produces the pathological equality case, try a random sample from [t
0
, t
1
]. Once
the new bracket is known, the method can be repeated until some stopping criterion
is met.
Brent’s method can be modified to support derivative information. A description
of that also occurs in Press et al. (1988).
A.6.2 Methods in Many Dimensions
Consider f : D ⊂ R
n
→ R,whereD is a compact set. Typically in graphics applica-
tions, D is a polyhedron or even a Cartesian product of intervals. If f is differentiable,
then the global minimum must occur either at a point where
∇f =
0oronthe
boundary of D. In the latter case if D is a polyhedron, then the restriction of f to
each face of D produces the same type of minimization problem, but in one less di-
mension. For example, this happens for many of the distance methods described in
Chapter 10 on geometrical methods. Solving the problem
∇f =
0 is a root-finding
problem and itself may be a difficult problem to solve.