Computer Graphics, Mathematics, Linear Algebra.
discriminant is positive, the ray hits the sphere on one end, continues through the sphere, and intersects the sphere again on the opposite side. This means that there will be two hit points. If the discriminant is 0, the ray touches the sphere at exactly one point. Now we can begin coloring