Previous | Next --- Slide 27 of 47
Back to Lecture Thumbnails
hal

We get potentially two values after solving for t. If both t values are positive, then the source is outside of the sphere and it's shooting the ray towards the sphere. If one t is positive and the other is negative, the source is inside the sphere. If there is only 1 t value, we know we're grazing it or hitting the sphere at a tangent. If the t values are imaginary, then the ray doesn't intersect the sphere.

sff

Apart from intersection, we may need to consider refraction for transparent materials? Like glass? That adds more steps for computation.

bainroot

During class, Sreya brought up the good question of why we needed a special case for computing ray intersection through a sphere, as opposed to a triangle. I was really surprised to find out that the sphere primitive was in fact a sphere, and not in an approximation of a sphere using many triangles (which means a lot more computations for the sphere, but is simpler if everything else in the scene is also a triangle).