I was able to get a starter code for a ray tracer online and the starter code has two "Geometries":
class sphere
class triangle
I understand the triangle since the code creates a mesh using triangles and gets the intersection between triangles and ray from each pixel. But how does sphere come into play?
So I've done some online researching and a lot of them discuss about triangle intersection and sphere intersection. but how do we use sphere in mesh?