I'm building a ray tracer and now I'd like to be able to render a torus. Which is the best way of checking ray-torus intersection? Should I solve the (quartic) equation analytically, or use some numerical method? In that case, which?
Well, you could start by trying this code by Jochen Schwarze. You might need to lower the epsilon value though (found some posts that mentioned 1e-30). If you experience "black holes" in your torus, you might need to do something more advanced.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform.
You can accept analytics or continue with necessary cookies only.
Learn more