1

I have an arc of a circle, and I have some other point in space (this might lie on the arc or it might not). I am looking for a formula that will compute the closest point on the arc to the other point. I also need to be able to get the distance from the start of the arc to this closest point.

what I know about the arc is: (1) the circle centre, (2) the angle of the beginning of the arc, (3) the arc angle, (4) the circle radius, (5) begin and end points of the arc on the circle circumference, (6) the direction the arc is going (i.e. Clockwise or Counter-clockwise)

what I know about the other point is: (1) its position

SupaGu
  • 129
  • 3
  • The other point must coincide the point on the arc. – Harsh Kumar Apr 18 '17 at 01:51
  • If the arc does not intersect the line between the point and the circle center, is the distance that you are looking for the point to the end of the arc (closest to point)? Also what do mean by the direction of the arc? Usually an arc is "a connected section of the circumference of a circle" and has no direction. – Χpẘ Apr 18 '17 at 02:05
  • Also is the "point in space" in the plane of the arc? "Space" implies 3D (or more) – Χpẘ Apr 18 '17 at 13:59

2 Answers2

1

thanks guys, using your helpful advise what I have done is:

compute vector from the centre of the arc circle to "other point" I then normalised this vector and multiply it by the radius to get the tangent point which is the closest point on the circle to "other point"

then from there, I determine if this tangent point is between the beginning and end of the arc and so can work out its distance from the start of the arc.

if it is outside of the arc beginning and end I compute the half angle of arc and then see if relative to this angle the tangent point is > PI or < PI in relation to see if it is closer to the end point or closest to the start point of my arc.

SupaGu
  • 129
  • 3
0

HINT

You know that the points on the arc has a constant distance of $r$ to the center of the circle. Given any "other point", the line starting from the center of the circle and ending at that point is known and fixed. And the third line of the triangle (sometimes those three points are in a line, and thus is not a triangle strictly speaking) formed by those three points are the distance you need.

Thus, all you need to do is the rotate the line connecting the arc and center of the circle, and get the smallest length for the third line.

Notice there are several cases for "the other point" to stay, e.g. within the angle of the arc and within the range of $r$, or could be within the angle of the arc but outside the range of $r$, or outside the range of the angle of the arc, etc.

Jay Zha
  • 7,792