public Sphere boundingSphere() {
Point3 center = new Point3(0.0, 0.5 * (height1 + height2), 0.0);
double height = Math.abs(height1 - height2);
double maxR = Math.max(radius1, radius2);
double radius = Math.sqrt(maxR * maxR + 0.25 * height * height);
return new Sphere(center, radius);
}