Finding circle center from two points and an arc length

Click For Summary

Discussion Overview

The discussion revolves around finding the center of a circle given two points on the circle, the arc length between them, and the starting angle. Participants explore methods to derive the circle's equation programmatically without resorting to complex systems of equations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant describes the need to find the equation of a circle based on two points, an arc length, and a starting angle, emphasizing the challenge of implementing this in C++.
  • Another participant seeks clarification on the "starting angle" and its relation to the center of the circle.
  • A participant explains that the starting angle is defined relative to the positive x-axis and the radius to one of the points, suggesting that it may not need to be explicitly provided.
  • One participant proposes a method involving the midpoint of the line segment between the two points and a perpendicular vector to find the center of the circle, incorporating the radius and height derived from the Pythagorean theorem.
  • A later reply expresses satisfaction with the proposed method for finding the center of the circle.

Areas of Agreement / Disagreement

Participants generally agree on the need to find the center of the circle based on the given parameters, but there is some uncertainty regarding the necessity and definition of the starting angle. The discussion includes multiple approaches to solving the problem, indicating that no single method has been universally accepted.

Contextual Notes

Participants discuss the geometric relationships involved and the mathematical methods to derive the center, but some assumptions regarding the definitions and relationships between angles and points remain unresolved.

MegatronX
Messages
5
Reaction score
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
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"?
 
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)
 
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?
 
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.
 
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 :)
 
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.
 
That works great

Thank you
 

Similar threads

Replies
4
Views
6K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K