# Reasonably-Good Bounding Sphere of an Affine-Transformed Sphere

I have a unit sphere transformed by a given $4\times 4$ affine transform (it is a 3D transform; using homogenous coordinates with $w=1$ allows representing translation).

I now need to calculate a bounding sphere of this transformed sphere. How can I do this?

For completeness, I should mention I've thought of some bad ways to do it.

For example, one could take the sphere's axis-aligned bounding box, transform that, and then compute the minimal bounding sphere of those 8 points. This is unsatisfactory because the bounding sphere will be very coarse. E.g. if the transform were the identity, we can see that the new bounding sphere will have $3 \sqrt{3} ~\times$ the volume.

So as additional requirements: the preferred method will produce a fairly tight bounding sphere and also be reasonably simple ($O(1)$ time, small constant).

2. As a refinement of this, forward transform the origin as well as the points $<1,0,0>, <0,1,0>, <0,0,1>$. The transformed origin is the center of the new bounding sphere, and the longest vector from the transformed origin to one of those transformed points is the radius.
• This is incorrect. None of your proposed methods work for the transformation $\begin{bmatrix}1&1&0&0\\0&0&0&0\\0&0&1&0\\0&0&0&1\end{bmatrix}$, for which you will estimate a radius of $1$ instead of $\sqrt2$. Ultimately, this is because you assume that the matrix can be decomposed as $TRS$, but this one cannot. Most affine transformation matrices are of the form $TR_1SR_2$, which is precisely what the SVD of the $3\times3$ block gives you. (While the above transformation is singular, most invertible transformations will also work. This is just the easiest to work out by hand.) – Rahul Apr 29 '18 at 5:28