2
votes

I have a infinite line in 3D, let's say its end points as A and B(long distance between A and B), and an axis-aligned arc, let's say its center as C, start point as S and end point as E. How do we calculate the distance between them?

Or the arc may be a helix?

Here is a picture for my question.

Question Scene

Arc or helix is on xy plane as the picture shows.

The line direction is show by the xyz axes.

The red point represent the line perpendicular to the screen.

The left and center picture show arc condition and the right one is helix.

1
could you paint it and put here screenshot?Dmitry Zagorulkin
In the current form the question seems more apt for maths.stackexchange.comSuvarna Pattayil
@SuvP And have posted it in math.stackexchange.com.Merlin

1 Answers

0
votes

if your arc is elliptic arc than it is quite simple:

  1. create transformation that convert your elliptic arc to circle arc. this is done by combination of rotation and scaling transform matrix. rotation must rotate your arc so its a,b axises are aligned to x,y axises (rotation angle value is usually directly known or you can compute it with arctan of one of the a,b axis) . Then apply scale to x or y coordinate so after scaling both axises a,b will have the same length.

  2. compute min distance between circle and point (it lies on line from circle center and your point of interest and the circle outline) I thing thats it. you can compute the formula by your self or google it or if you have still trouble with it write here and i will compute it.