From: rusin@vesuvius.math.niu.edu (Dave Rusin) Subject: Re: Geometry 3D problem for fans! Date: 14 Jul 1999 22:59:49 GMT Newsgroups: sci.math Keywords: intersection between a torus and a circle in R^3 In article <7m49vg$905$1@talia.mad.ttd.net>, Antonio Jimeno wrote: >Compute the intersection (if any) between a torus and a 3D circle. > For the torus we know: > Major and minor radius scale > Centre point translate > Revolution axis (vector) rotate Then the torus has the form 2 2 2 2 2 2 2 -4 r + 4 z + (x + y + z - r - 1) = 0 > For the circle we know: A circle can be parameterized as the set of points of the form p0 + cos(t) * v + sin(t) * w where p0 is the center and {v,w} is a pair of orthogonal vectors from p0 to the circle (having equal length). Since I'm in an algebraic setting so far, let me continue that; parameterize the circle instead as the set of points p0 + ((1-s^2)/(1+s^2)) * v + ((2*s)/(1+s^2)) * w as s ranges over the whole line. >The solution: > > Only aproximate (iterative) methods. Maybe those are the best methods, but if you want > Anyboby knows any analytical solution (no iterative) for the problem. you can substitute in the coordinates (x,y,z) of the points on the circle, each a rational function of s, into the equation for the torus. There results a polynomial equation in s, nominally of degree 8, but with the conditions v.w =0 and v.v = w.w we can cancel a (1+s^2)^2 so this is a polynomial of degree 4 in s. Yes, there is an algebraic solution to this polynomial. No, you don't want to see it or use it. Of course it is clear (?) geometrically that we should expect the intersection of a circle and a torus to have up to 4 points. (By the way the Galois group is generically Sym(4) so we don't expect any particular simplification of this quartic.) dave