[comp.graphics] SMALLEST SPHERE THREE POINTS

MA.JOE@forsythe.stanford.edu (Joe Bayus) (01/03/90)

Major error on the formulas for smallest sphere enclosing
three points which form an acute triangle....sorry about that,
but brain death comes in many forms...real formulae are as follows:
                                      ----
Definitions:

Acute triangle abc
ab = longest side
L  = Length of ab
ac = next-longest side
N  = Length of ac
bc = shortest side
S  = Length of bc
f  = focus (center) of sphere
l  = center-point of longest side
D  = Distance to focus from longest side (length of line lf)
R  = Radius of sphere (length of lines fa, fb, and fc)
E  = Distance from vertex acb (opposite longest side) of inter-
     section with shortest side of perpendicular drawn from
     vertex cab
G  = Length of perpendicular from vertex cab to intersection with
     shortest side

Formulae:

E = ( S**2 - L**2 + N**2 ) / ( 2*S )
G = SQR ( N**2 - E**2 )

D = ( L*E ) / ( 2*G )
R =  D * N / E



I realize that this is only fundamental geometry, and
that the expressions require further work for (x,y) coordinate
usage in a graphics program, but it's a start... I would be inter-
ested in hearing about any refinements to these formulae, trans-
forms or reductions, etc.