# how to find center/radius of a sphere

Say you have an irregular tetrahedron, but you know the (x,y,z) coordinates of the four vertices; is there a simple formula for finding a sphere whose center exists within the tetrahedron formed by the four points and on whose surface the four points lie?

• Do you mean the center of circumsphere? Oct 22 '13 at 18:03
• Oct 22 '13 at 18:04

Simple formula, maybe not.

Take any three out of four points. The sphere in question must contain the circle through the three points within the plane of the three points. Which is to say, take three points, circumscribe a circle around that triangle. That circle has a center. If you draw a line through that center, orthogonal to that plane, the center of the sphere is somewhere along that line.

Now take out one of the points and put in the fourth, you now have a different three points in a different plane. Do the same things. The two lines must intersect in the center of the sphere.

If any three of the points are nearly collinear, or the four are nearly coplanar, there are any number of ways to make the method more robust

• @robjohn, hi. Thanks for taking care of that question with the sum of $1/\sqrt n.$ Oct 22 '13 at 18:18

The formula of a sphere is of the form : $$(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 = R^2$$

Where $(x_0,y_0,z_0)$ is the centre of the sphere and $R$ is the radius. If you know the four points of your tetrahedron, they must all satisfy the above equation so solving the system of four (second degree) equations with four unknowns ($x_0, y_0, z_0$ and $R$) is the way to go and gives you the centre of the sphere as well as the radius.

Beware, the above equations can give you more than one solution as they are second order.

There might be a magic formula where you just plug it in but I think it is very ugly assuming it exists. Best way would be to solve the system.

Hint:

Step 1: Find circumcircle $A$ for any three of the four points.

Step 2: Find a circumcircle for the fourth point $P$ together with two points connected by a diameter $l$ of circle $A$ where a plane containing $l$ meets $A$ at a perpendicular angle and also contains $P$.

Then your circumsphere has radius and center equivalent to the radius and center of the circle found in step 2.

The other answers reduce to the two-dimensional problem.
Why not reduce it to the one-dimensional problem: The circumcentre is equidistant from each point.
Take the plane that is equidistant from $a$ and $b$, which is $2x.(a-b)=|a|^2-|b|^2$.
There are six of these planes, take any three that involve all four points, and solve three equations in the three components of $x$