
808 Chapter 13 Computational Geometry Topics
points form an equilateral triangle, the common length of the sides being
√
3. The
distance from (1, 0) to (−3/4, 0) is 7/4 >
√
3. Therefore, (1, 0) and (−3/4, 0) form
the most separated pair of input points. The minimum-area bounding circle is the
one containing the equilateral triangle and has center (0, 0) and radius 1. The circle
containing (1, 0), (−1/2,
√
3/2), and (−3/4, 0) has center (1/8,
√
3/8) and radius
√
13/4 < 1, but (−1/2, −
√
3/2) is not in that circle. The circle with antipodal points
(−3/4, 0) and (1, 0) has center (1/8, 0) and radius 7/8, but (−1/2, ±
√
3/2) are not
in that circle since the distance from those points to the circle center is approximately
1.068 > 7/8.
An exhaustive approach will produce the answer, but is slow. All triples of points
are analyzed. The minimum-area circle containing the three points is either the cir-
cumscribed circle or a circle for which two of the three points are antipodal. This is
particularly the case when the three points are collinear. The bounding circle of min-
imum radius in this process is tracked during the analysis. At the end, we have the
minimum-area circle for the input set. The algorithm is O(n
3
).
A more efficient approach is to grow a circle to contain the points. The initial circle
is the one that contains the first two input points. Each additional point is tested for
inclusion in that circle. If all are contained, with some possibly on the circle itself,
the initial circle is the one of minimum area. We are not usually so lucky to have this
happen. More likely is that one of the remaining points Q is outside the initial circle.
If this happens, the initial circle was not large enough and must be grown to include
Q.Infact,Q will be used as a supporting point for this new circle. A problem is
that many point-in-circle tests were performed before Q was encountered (see Figure
13.80). When the initial circle is modified to a new circle, points in the initial circle
might not be in the modified one. Effectively, the algorithm must start over, and all
the points have to be tested for containment in the new circle.
If the initial circle is the minimum-area circle, that was determined by testing n −
2 = O(n) points. If only m restarts are needed and m is effectively a small constant
compared to n, then the algorithm is O(n).However,ifm is comparable in size to
n, the asymptotic behavior is worse than O(n). To see this, consider the points on
a hemicircle, P
i
= (cos θ
i
, sin θ
i
),whereθ
i
= π i/(n − 1) for 0 ≤ i<n. The initial
bounding circle is supported by P
0
and P
1
. The next point P
2
is outside that circle,
so the algorithm is restarted. The new circle is supported by P
0
and P
2
. The point P
1
is inside this circle, but P
3
is not. At the ith iteration, the current bounding circle is
supported by P
0
and P
i
, points P
j
for 0 <j<iare inside the circle, but P
i+1
is not.
That is, the algorithm must restart each time. The ith iteration requires i point-in-
circle tests. The minimum-area circle is only known once you reach point P
n−1
, and
in fact all input points are on the circle. The total number of point-in-circle tests is
n−1
i=1
= n(n − 1)/2 = O(n
2
). More complicated examples of this type even lead to
O(n
3
) behavior, just like the exhaustive approach.
Taking a closer look at the hemicircle example, suppose that instead of processing
the points in the order given, the points are randomly permuted, then processed. For
the sake of argument, let P
0
always be a supporting point. If the second point in the
permuted set is P
j
,wherej is nearly n − 1, the initial circle is quite large. In the