There is wrapper for this in scheme-core that also calculates the sphere primitive on demand. This is the standard predicate for the Scene type. Defaults are 30 and 8, respectively. For a given eye ray and zbuffer structure, this call sets zbuffer for the eye ray's viewpoint. This material will transmit the rays outside all the other CSGs.
Scene is the initial scene.
If global lock is 0, global ray will also be set. This global is initialized from the scheme-core, and contains parametric version of the sphere. This should be called before you cast the first ray into the image. This function goes up the CSG object hierarchy and checks whether the intersection trully occured, that is, whether the surface is really a boundary of a volume. The section is true if the toplevel container's activity is about to change.