I have 2 points A(x1, y1) and B(x2, y2) on a circle and the angle between them alpha(example = 70 degree) I would like to find the center of the circle and radius I use System.Drawing namespace of C#

Please help me solve this problem.
I have 2 points A(x1, y1) and B(x2, y2) on a circle and the angle between them alpha(example = 70 degree) I would like to find the center of the circle and radius I use System.Drawing namespace of C#

Please help me solve this problem.
Copyright © 2021 Jogjafile Inc.
Let's draw some lines:
We have a right triangle with a hypotenuse R, an angle of 35° and an opposite side h. This results in the relation:
We can resolve by R:
h is the half distance between A and B. We can calculate it by using the Phytagorean theorem:
Note that
MathF.Sinexpects a argument given in radians. We can convert degrees to radians with:The center is a bit more complicated. Idea: Take the midpoint M between A and B and move along the neighbor in the triangle.
Given h and R the length of the neighbor is (let's call it r)
Observation (with the center O):
(I hope I got the signs right)
I.e.,
and
Midpoint M:
With C# and the following usings:
We can write:
Note that the
Vector2struct does some calculations for us, like calculating the distance AB.Test:
Prints:
Note that the angle in your image is not 70°, so we cannot measure there to test if this is correct. Therefore, I have drawn this example on a piece of paper and measured the result. The function seems to work correctly.