# Annuloid (Torus)-line intersection

I need calculate ray (line) intersection with torus for my ray-tracing program (I know, its to graphics, but i need math behind it).

I can solve equation of order $x^4$, but thats too way slow (Cardano's method). So is there better way, how to calculate this ?

My torus has center $[0,0,0]$ and $R$, $r$ diameters Line (Ray) is point and its direction vector

Thanks

-
Is applying an explicit formula for the solutions of a 4th-degree polynomial too slow, or are you depressing the polynomial to solve it? Here is an explicit formula for the solutions of a general 4th-degree polynomial. –  Isaac Oct 25 '10 at 17:54
Cross-posted to MO: mathoverflow.net/questions/43552/… –  Joseph O'Rourke Oct 25 '10 at 20:09