Equations of spheres and their intersections