Tuesday, 15 February 2011

c++ - Any method to calculate the distance between an infinite line and an axis-aligned arc? -


I have an infinite line in 3D, suppose its end point is long between A and B (A and B Distance), and an axis-coalition arc, let's call it its center as C., starting points as s and end point in the form of e. How do we calculate the distance between them

Or can the arc be a helix?

Here is a picture for my question.

question view

as picture show Arc or Helix XI is on the plane.

The line direction is shown by xyz axes.

The red dot shows the vertical line to the screen.

The left and middle picture shows the status of the arc and has the right helix.

If your arc is quite simple than elliptic arc:
  1. Make changes that change your elliptic arc to circle arc. This is done by combining rotation and scaling transmission matrix. Rotation should rotate your arc to align with A, B axis X, Y axis (rotation angle value is usually known directly or you can calculate it with arctan of a, b axis) . Then apply the scale to coordinate X or Y, so after scaling both the letters, B will have the same length.

  2. Calculate the minimum distance between the circle and the point (This is on the circle center and the line of your interest and circle outline. I) You can calculate the formula by yourself or Google Or if you have trouble with it, write here and I will count it.

No comments:

Post a Comment