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