The Analytical Expressions for Computing the Minimum Distance between a Point and a Torus

In this paper, we present the analytical expressions for computing the minimum distance between a point and a torus, which is called the orthogonal projection point problem. If the test point is on the outside of the torus and the test point is at the center axis of the torus, we present that the orthogonal projection point set is a circle perpendicular to the center axis of the torus; if not, the analytical expression for the orthogonal projection point problem is also given. Furthermore, if the test point is in the inside of the torus, we also give the corresponding analytical expression for orthogonal projection point for two cases.


Introduction
In this paper, we discuss how to compute the minimum distance between a point and a spatial parametric surface and to return the nearest point on the surface as well as its corresponding parameter, which is also called the point projection problem (the point inversion problem) of a spatial parametric surface.It is very interesting for this problem due to its importance in geometric modeling, computer graphics and computer vision [1].Both projection and inversion are essential for interactively selecting surfaces [1] [2], for the surface fitting problem [1] [2], for the reconstructing surfaces problem [3]- [5].It is also a key issue in the ICP iterative close for construction and rendering of solid models with boundary representation, projecting of a space curve onto a surface for curve surface design [6].Many algorithms have been developed by using various techniques including turning into solving a root problem of a polynomial equations, geometric methods, subdivision methods, circular clipping algorithm.For more details, see [1]- [23] and the references therein.
In the various methods mentioned above, all the iterative processes can produce one iterative solution.Different from the above methods, we consider the special situation which the test point have countless corresponding solutions for the orthogonal projection problem.We present the analytical expression for computing the minimum distance between a point and a torus.If the test point is on the outside of the torus and the test point is at the center axis of the the torus, we know that the orthogonal projection point set is a circle which is perpendicular to the center axis of the torus; If not, the analytical expression for the orthogonal projection point problem is also given.In addition, if the test point is in the inside of the torus and is on the major planar circle, then the corresponding analytical expression for orthogonal projection point set is minor planar circle.Moreover, if the test point is in the inside of the torus and is not on the major planar circle, we also present the corresponding analytical expression for orthogonal projection point of the test point.

Test Point Being on the Outside of the Torus
The torus Γ can be defined as ( ) x y R z r in 3  R , where R r > .In this subsection, we suppose that test point ( ) , , x y z is on the outside of the torus, namely, ( ) It denotes that the center axis of the torus is the z-axis, the center point is ( ) Firstly, we deal with the first kind of circumstance which the test point is on the center axis of the torus Γ , namely the test point's coordinate is ( ) 0 0, 0, z .Projecting a test point ( ) 0 0, 0, z onto a torus surface Γ can be done as follows.Major planar circle is defined as 2 2 2 , 0.
Assume that the coordinates of arbitrary point of major planar circle is ( ) It is not difficult to find that line segment 1 L determined by test point ( ) , , 0 x y is perpendicular to the torus.So the intersection of line segment 1 L and torus Γ is the minimum distance between test point ( ) 0 0, 0, z and torus Γ .We can know that parametric equation of the line segment 1 L is ( ) .
From ( 1) and (4), we get that the corresponding parameter value of intersection of parametric equation for the line segment 1 L and the torus Γ is By ( 3) and ( 5), we obtain In the case of the test point being at the center axis of the torus, Formula (6) indicates that the corresponding orthogonal projection point set of the test point is a circle which parallels to major planar circle (see Figure 1).
In the following content, we try to discuss the second orthogonal projection case which test point ( ) , , x y z is not on the center axis of the torus.This means that neither of the first and second coordinates of the test point ( ) x y z are zero.In order to compute the minimum distance between the test point ( ) , , x y z and the torus Γ , we define a plane 0 Ω which passes through the central axis or the z-axis and a line which is determined by the test point ( ) x y z and the central point ( ) 0, 0, 0 .So the minimum distance between test point ( ) , , x y z and the torus is the intersection between the orthogonal projection line and the torus Γ .In the following, we intend to compute the minimum distance between test point ( ) , , x y z and torus Γ according to this idea.We deduce that the general plane equation 0 Ω passing through the z-axis is From ( 2) and ( 7), we obtain that the corresponding intersection of the plane 0 Ω and major planar circle of the torus is . If the intersection of the plane 0 Ω and major planar circle of the torus is , then the corresponding vector between this intersection and test point ( ) Furthermore the parameter equation of the line segment 2 L determined by the intersection and test point ( ) And because the intersections of the torus Γ and the plane 0 Ω is the following first minor planar circle 0 Ψ ( ) by ( 8) and ( 9), the corresponding parameter value of intersection of the line segment 2 L and the minor planar . Substituting this parameter value into (8), we obtain the intersection ( ) , , x w y w z w where ( ) ( ) . If the intersection of the plane 0 Ω and the major planar circle of the torus is , then the corresponding vector between this intersection 0 0 and the test point ( ) Furthermore the parameter equation of the line segment 3 L determined by the intersection and the test point ( ) Because the intersections of the torus Γ and the plane 0 Ω is the following second minor planar circle 1 Ψ ( ) (11) from ( 10) and ( 11), the intersection parameter of the line segment 3 L and the second minor planar circle 1 Ψ is ( ) . Substituting this parameter value into (10), we get the second intersection ( ) , , x w y w z w of the segment line 3 L and the torus Γ where ( ) In the following, we explain that the distance between the intersection ( ) , , x w y w z w and the test point ( ) x y z is the minimum distance.Because the test point ( ) , , x y z is at the outside of the torus Γ , so ( ) x y R z r + + + > .From the two inequalities, we get ( ) ( ) x w x y w y z w z x w x y w y z w z This demonstrates that the distance between the second intersection and the test point is longer than the distance between the first intersection and the test point.Thus the distance between the intersection ( ) x w y w z w and test point ( ) , , x y z is minimum (see Figure 2).
. In the same way, if the test point ( ) . Of course, if the test point ( ) x y z is the special point ( ) 0 0, 0, z , then the corresponding orthogonal projection point set of the special test point ( ) 0 0, 0, z would be point set presented by Formula (6).In a word, for any test point being on the outside of the torus, we present the corresponding analytical expressions for the orthogonal projection point or the orthogonal projection point set.

Test Point Being in the Inside of the Torus
In this subsection, we suppose that test point ( ) , , x y z is in the inside of the torus, namely, ( ) x y R z r + − + < .Firstly, we deal with the first case which the test point is not on the major circle.In fact, analogous to treatment method of the second part content of the second section, it is easy to verify that orthogonal projection point of the test point ( ) x y z is ( ) , , x w y w z w , where ( ) For more special cases, if test point ( ) ( ) x r R y z r , then the corresponding orthogonal projection point set of the test point , then the corresponding orthogonal projection point set of the test point Remark 2. In this subsection, we fully present the corresponding orthogonal projection point or point set of arbitrary test point which is in the inside of the torus, namely, the corresponding analytical expression of orthogonal projection point for the minimum distance between the test point and the torus.If the test point is not on the major planar circle, then the corresponding analytical expression of orthogonal projection point is only one point.If the test point is on the major planar circle, then the corresponding analytical expression of orthogonal projection point is minor planar circle.Besides that, if the test point ( ) , , x y z satisfies the relationship ( ) x y R z r + − + =, it is obviously easy to know that the test point is on the torus.

Conclusion
This paper investigates the problem related to a point projection on the torus surface.We present the analytical expression for the orthogonal projection of computing the minimum distance between a point and a torus for all kind s of positions.An area for future research is to develop a method for computing the minimum distance between a point and a general completely center symmetrical surface.
the intersection of the line segment 1 L and the

Figure 1 .
Figure 1.In the case of the test point being on the center axis of the torus, the corresponding orthogonal projection point set is a circle perpendicular to the center axis of the torus.

Figure 2 .
Figure 2. In the case of the test point being not on the center axis of the torus, the corresponding orthogonal projection point of being minimum distance.Remark 1.If the test point ( ) 0 0 0 , , x y z y z , then the corresponding orthogonal projection point of the special test point Now we consider the second case which the test point is in the inside of the torus and is on the major planar circle such that Similar to the treatment method of the first part content of second section, it is easy to know that orthogonal projection point set of the test point ( ) planer circle.We directly present the corresponding analytical expression according to the test points being at different positions for major planar circle.Since Formula (9) denotes two minor planer circles, in fact, orthogonal projection point set of arbitrary test point being on the major planar circle just only has one minor planar circle.According to this reason, we try to present a unified and concise analytical expression of the only one minor planar circle for arbitrary test point being on the major planar circle.the corresponding orthogonal projection point set of the test point ( )