vasiliy.fk
New member
- Joined
- Mar 8, 2017
- Messages
- 2
Hi guys, first time poster here. I'm working on a math problem for a software application I'm writing. The problem is as follows:
You are given a circle with center point O and radius r. There are three points on the circumference of the circle. The points are A, B, and C. You know the x any y coordinates of each point, as well as the point's polar angle (0 to 2pi). Using these points, a circular arc is drawn along the circumference of the circle from A to B to C. Remember, the arc is circular so you cannot turn back at point B and head the opposite way to C. I need to use this information to determine if the arc has arc length greater than, less than, or equal to pi*r (so: is the arc longer or shorter than half a circle).
Here are a few other details [switching to degree mode here]:
-Point B is usually never further than +/- 20 degrees from point A.
-The angle difference between B and C can be more than 180 degrees so simply using arccos() calculations will not be suitable for this problem because the output of arcsos() has 180 degree extremes.
-The solution most not be iterative because there are hundreds of other complex calculations happening before and after this one, especially in the animations.
Thanks for the help
* P.S.
* Through some calculations irrelevant to this problem, I was able to determine the angle difference between A and B by finding a 'dTheta' value and ADDING it to the polar angle of made by point A. So if angle A is 10 degrees, and dTheta is -15 degrees, angle B would be 10 + (-15) = -5 degrees, but in my polar system, this can easily be converted to 355 degrees. Similarly, if we know dTheta is negative, we can keep subtracting [or adding negative] degrees from A or B and end up (while still following the arc's trajectory) at angle C (or some angle that is C +/-360).
You are given a circle with center point O and radius r. There are three points on the circumference of the circle. The points are A, B, and C. You know the x any y coordinates of each point, as well as the point's polar angle (0 to 2pi). Using these points, a circular arc is drawn along the circumference of the circle from A to B to C. Remember, the arc is circular so you cannot turn back at point B and head the opposite way to C. I need to use this information to determine if the arc has arc length greater than, less than, or equal to pi*r (so: is the arc longer or shorter than half a circle).
Here are a few other details [switching to degree mode here]:
-Point B is usually never further than +/- 20 degrees from point A.
-The angle difference between B and C can be more than 180 degrees so simply using arccos() calculations will not be suitable for this problem because the output of arcsos() has 180 degree extremes.
-The solution most not be iterative because there are hundreds of other complex calculations happening before and after this one, especially in the animations.
Thanks for the help
* P.S.
* Through some calculations irrelevant to this problem, I was able to determine the angle difference between A and B by finding a 'dTheta' value and ADDING it to the polar angle of made by point A. So if angle A is 10 degrees, and dTheta is -15 degrees, angle B would be 10 + (-15) = -5 degrees, but in my polar system, this can easily be converted to 355 degrees. Similarly, if we know dTheta is negative, we can keep subtracting [or adding negative] degrees from A or B and end up (while still following the arc's trajectory) at angle C (or some angle that is C +/-360).