3D ellipsoids: rendering and collision detection
To detect collisions between sphere and ellipsoids we use a Newton based algorithm for finding the nearest point on an ellipsoid to another point from Robert Nümberg using his notes. Remarkably it appears to have worked perfectly first time!
 Whitted, T., 1979, August. An improved illumination model for shaded display. In ACM SIGGRAPH Computer Graphics (Vol. 13, No. 2, p. 14). ACM.