I am getting start point, end point and centre point of an arc in the cartesian coordinate system. What I need to find out is the start angle (with respect to the centre point of the arc), sweep angle or delta angle (difference between end and start point in degrees with respect to the centre point of the arc) and radius (which is easy). The centre point would not always be in the origin of the cartesian coordinate system and the calculation(s) would have to account of the 4 quarters of the coordinate system.
What would be the easiest/simplest way to do this calculation?
Hope this question is in the right spot and thanks a lot for your help.
Unless if by the arc, you mean the major arc that passes through the centre point. Then this has a solution.
Let (h,k) be the center of the circle.
Then the 3 radii ...to the start, centre and end points...are equal in lengths.
(h +46.0930)^2 +(k -109.1313)^2 = r^2 -----(1)
(h +116.9062)^2 +(k +398.0969)^2 = r^2 ----(2)
(h +0.2805)^2 +(k -92.7029)^2 = r^2 --------(3)
3 unknowns in 3 equations, solvable for unique h, k and r.
"...the start angle (with respect to the centre point of the arc)..."
Let's call that angle theta.
tan(theta) = (-398.0969 -109.1313) /(-116.9062 +46.0930) = 7.1629
theta = arctan(7.1629) = 82.0524 dgrees
"...sweep angle or delta angle (difference between end and start point in degrees with respect to the centre point of the arc) ..."
Let's call that angle alpha.
For the end point,
angle phi = actan[(-398.0969 -92.7029) /(-116.9062 +0.2805)] = 76.63307 dgrees.
Therefore, angle alpha = 82.0524 -76.63307 = 5.41933 degrees.
That is how I understand your question.
Will this method give always the correct angles. What I mean is that sometimes although and angle is 204degrees it will come out as 24, and then it has to be adjusted to the proper quadrant. So I need to know whether it will give me correct angles or do I still have to worry about adjusting them based on signs of x and y?