Finding the center of a hypersphere defined by 5 surface points?

Hello all, I'm finally on my weekend so I can give these some shots. First, I arrived at the following C#/Unity code I can visually confirm to be working wonders. It obviously fails when all points are coplanar, but that's pretty much expected:

static public Vector3 TetrahedronCircumcenter3D(Vector3 a, Vector3 b, Vector3 c, Vector3 d) {
Vector3 ba = b - a; //all points from an 'a' point of view
Vector3 ca = c - a;
Vector3 da = d - a;
Vector3 crosscd = Vector3.Cross(ca, da); //perpendicular vectors to those above
Vector3 crossdb = Vector3.Cross(da, ba);
Vector3 crossbc = Vector3.Cross(ba, ca);
return a + (
(
ba.sqrMagnitude * crosscd +
ca.sqrMagnitude * crossdb +
da.sqrMagnitude * crossbc
) *
(0.5f / (ba.x \* crosscd.x + ba.y \* crosscd.y + ba.z \* crosscd.z)) // half point
);
}

http://reprints.gravitywaves.com/People/Hollasch/Four-Space%20Visualization%20of%204D%20Objects%20-%20Index.htm

/r/algorithms Thread