Adding sphere-ray intersection routine