Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What you are really trying to compute is the pair of points that minimizes the distance between points that lie on 2 different circles in 3 dimensions. The method that you should be employing to find the exact solution (as in almost all optimization problems) is to represent the distance as a function of all possible points and to take its derivate with respect to the independent variables and set the resulting expressions to 0. Since you have 2 circles, you will have 2 independent variables (ie. the angle of a point on one circle and one on the other circle). Once you have solved the minimization equations you would have also found the points on the circles that will satisfy your constraint. (Basically you will find the angles on the circles for the pair of points you are looking for.)</p> <p>I have found a <a href="http://www.geometrictools.com/Documentation/DistanceCircle3Circle3.pdf" rel="nofollow noreferrer">paper</a> online (at <a href="http://www.geometrictools.com/" rel="nofollow noreferrer">this site</a>) that rigorously goes through with the calculations but the end result is solving an 8th order polynomial equation. You might try to simplify the equations and come up with a less exact solution that satisfies your needs.</p> <p>There is also an <a href="http://portal.acm.org/citation.cfm?id=637643" rel="nofollow noreferrer">paper</a> that claims to have a much faster algorithm for finding the distance between two circles in 3d; however, I cannot view the contents and, thus, cannot tell if it also gives you the pair of points that satisfy that condition.</p> <p><strong>UPDATE:</strong> Having re-read your question, I see that even though you are asking for a way to find the closest pair of points on two circles in 3 dimensions, I think, you should pay more attention to the properties of the NURBS curve that you are trying to extrude the 2D polygon along. You mention that the orientation of the circle at a given point on the curve is specified by the tangent vector at that point. However, there is more to 3D curves than just the tangent vector; there is the <strong>normal</strong> (or <strong>curvature</strong>) vector that points towards the center of curvature of the curve at a given point and then there is the <strong>torsion</strong> vector that basically specifies the amount of "lift" of the curve from the plane given by the tangent and the normal vectors. All of these define a (what is called) Frenet frame. You can read up more on these at the <a href="http://en.wikipedia.org/wiki/Differential_geometry_of_curves" rel="nofollow noreferrer">Wikipedia article</a>.</p> <p>My suspicion is that you can achieve the effect you desire by joining the points of consecutive circles that each lie along the the normal vector direction of the underlying 3D curve. That way, you will have twisting only when the curve is actually twisting, ie when the torsion vector is non-zero and the normal vector is changing direction as well. In other circumstances, this should satisfy your actual need. </p> <p>You probably don't need the overkill of finding closest points on consecutive circles.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload