Finding circle center from two points and an arc length

In summary, the individual is trying to find the equation for a circle given two points on the circle, the starting angle, arc length, and two points along the circle. They are looking for a way to find the center of the circle programmatically without having to solve a system of linear equations. One suggested method is to use the mid-point of the two given points and a vector perpendicular to the line connecting the points to calculate the coordinates of the center.
  • #1
MegatronX
5
0
I'm trying to find the equation for a circle given two points in x, y and the starting angle, arc length, and two points along the circle. I need to find the equation because I need to translate a sprite along the curved path from one point to another.

The situation ends up looking like this:A
|\
|a\
|--\
|---\
----c C
|---/
|--/
|b/
|/
B
A = point 1
B = point 2
C = center of the circle
the arc travels from a to b
c = arc angle

Now, I can clearly determine the length of all sides as well as the angles. that's not problem. I can use that to make a system of equations and solve them together. This works, but the problem is that I need to be able to do this programmatically, and attempting to solve systems of equations in C++ is proving to be pretty difficult. I was hoping there was a more straight forward/easy way to find the center when two points are know and all the angles/lengths are known.

Thanks in advance for any help
 
Mathematics news on Phys.org
  • #2
MegatronX said:
I'm trying to find the equation for a circle given two points in x, y and the starting angle, arc length, and two points along the circle.

If I understand you, you are given the coordinates of two points on the circle and the length of the arc between them. But what do you mean by the "starting angle"?
 
  • #3
by starting angle I'm referring to the the angle the starting point makes relative to the center. That is where the arc angle starts (its just simply the angle the starting point makes)
 
  • #4
MegatronX said:
by starting angle I'm referring to the the angle the starting point makes relative to the center. That is where the arc angle starts (its just simply the angle the starting point makes)

Angles require two sides. Are you talking about angle c in your picture? If not, what two sides make up that angle?
 
  • #5
In thi case the positive x-axis (angle 0) (originating from the center) and the radius from C to A form the starting angle. Now that I think about it, the starting angle doesn't need to be given, it can be derived by which point A or B forms the lesser starting angle.
 
  • #6
No, C is the unknown and it can be anywhere. Its directly dependent on A and B. I know point A, point B and the angle of the arc that needs to be drawn between them. I assumed I'd need to provide a starting angle for the arc but now I don't think that's necessary.

In the drawing, C is the center of the circle that describes the arc between A and B. If it's possible, i want to be able to find C (the center of the circle) without solving a system of linear equations as that is proving to be difficult when solving. programmatically.

I'm sorry, i guess I'm not making this clear enough heh. Thansk for the help so far though :)
 
  • #7
MegatronX said:
A
|\
|a\
|--\
|---\
----c C
|---/
|--/
|b/
|/
B
I was hoping there was a more straight forward/easy way to find the center when two points are know and all the angles/lengths are known.

Thanks in advance for any help

Let d be the distance from A to B. If you know A and B you can find its mid-point M. Let's say the vector AB is <s,t>. Then a vector perpendicular to it is <-t,s>. Divide that vector by its length and call the resulting vector V. If you know the radius r you can calculate the height h of your triangle with the Pythagorean theorem using hypotenuse r and leg d/2.

Then if O is the origin, the coordinates of the center are OA+ (1/2)AB± hV, with the sign chosen depending on which side of AB the center is on.
 
  • #8
That works great

Thank you
 

FAQ: Finding circle center from two points and an arc length

1. How do I find the center of a circle given two points and an arc length?

To find the center of a circle using two points and an arc length, you will need to use the formula (x1-x2)^2 + (y1-y2)^2 = (2r)^2, where (x1,y1) and (x2,y2) are the coordinates of the two points, and r is the radius of the circle. You can then solve for the x and y coordinates of the center.

2. Can I find the center of a circle with just two points?

No, you will need to have an additional piece of information, such as the arc length, to find the center of the circle. Two points alone are not enough to determine the center.

3. Is it possible to find the center of a circle if I only know the radius and one point?

Yes, you can use the formula (x-x1)^2 + (y-y1)^2 = r^2, where (x1,y1) is the coordinates of the known point and r is the radius of the circle. This will give you two possible solutions for the center, since a circle can have two centers given a radius and one point.

4. What if I don't know the arc length, but I know the angle of the arc?

If you know the angle of the arc, you can use the formula r = (l/θ), where r is the radius, l is the length of the arc, and θ is the angle in radians. Once you have the radius, you can then use the formula from question 1 to find the center of the circle.

5. Can I find the center of a circle using three points?

Yes, if you have three non-collinear points, you can use the formula (x1-x)^2 + (y1-y)^2 = (x2-x)^2 + (y2-y)^2, where (x1,y1), (x2,y2), and (x,y) are the coordinates of the three points. This will give you two possible solutions for the center of the circle.

Similar threads

Replies
1
Views
2K
Replies
16
Views
1K
Replies
8
Views
2K
Replies
2
Views
1K
Replies
1
Views
848
Replies
1
Views
2K
Replies
22
Views
818
Replies
1
Views
2K
Back
Top