Implemented algebraic ray sphere intersection