}
@Override
public Intersection intersect(Ray r)
{
Intersection result = new Intersection();
Ray ray = worldToObject.transform(r);
// compute quadratic sphere coefficients
double a = ray.d.x*ray.d.x +ray.d.y*ray.d.y + ray.d.z*ray.d.z;
double b = 2 * (ray.d.x*ray.o.x + ray.d.y*ray.o.y + ray.d.z* ray.o.z);