Computer Graphics, Python, Mathematics, Game Development, Game Design.
discriminant Since d (direction) is a unit-vector, we have a=1. Once we calculate the discriminant of that equation, there are 3 possibilities: fig. 5— sphere discriminant We will only use the third case to detect intersections. Here’s a function that can detect intersections between a ray and a