Smallest Enclosing Circle

The Algorithm
Foremost, observe that the minimal enclosing circle, MEC, is entirely determined by the Convex Hull of a given set of point. The reason is the points of the set touched by the minimal enclosing circle are always on the convex hull of the set.

First step of the algorithm is to compute the convex hull, H, of the points in linear time. Clearly, we can do this since points are kept ordered by x-coordinate. Call the convex hull H and the number of convex hull vertices h. Next step is to pick any side, say S, of the convex hull. The main loop of the algorithm is as follows:

Main Loop

 * 1) For each vertex of H other than those of S, we compute the angle subtended by S. The minimum such angle occurs at vertex v, and the value of the minimum angle is α (alpha).
 * 2) *IF α  ≥ 90 degrees THEN
 * 3) **We are done!
 * 4) **/* The minimal enclosing circle is determined by the diametric circle of S */
 * 5) *IF α < 90 degrees THEN
 * 6) **Goto step 2 below.
 * 7) Since α < 90 degrees, check the remaining vertices of the triangle formed by S and v.
 * 8) *IF no vertices are obtuse THEN
 * 9) **We are done!
 * 10) **/* The MEC is determined by the vertices of S and the vertex v */
 * 11) If one of the other angles of the triangle formed by S and v is obtuse, then set S to be the side opposite the obtuse angle and repeat the main loop of the algorithm (i.e., Goto step 1 above).

Reference: http://www.personal.kent.edu/~rmuhamma/Compgeometry/MyCG/CG-Applets/Center/centercli.htm