Implemented an intersection test for rays and spheres