Link to home
Start Free TrialLog in
Avatar of fornuftit
fornuftitFlag for Sweden

asked on

Center of circle

See attached image. The point P1 is at the end of a line, the line has the angle At1. The point P2 is at the beginning of a line with the angle At2. I know the coordinates for P1 and P2. I also know the angles At1 and At2. A radius is formed between P1 and P2 and I need to know the center point Pc for the (invisible) circle the which is formed with P1, P2, At1 and At2. The points P1 and P2 can be anywhere in the coordiante system.

I'm developing a c# application and I need some code for theese calculations.

//Thomas
centerpoint.png
Avatar of Paul Sauvé
Paul Sauvé
Flag of Canada image

I believe that you must consider that the 2 straight lines through P1 and P2 are both tangent to the circle of which the arc P1-P2 is a part of the circumference.

Since a tangent on the circumference of a circle is perpendicular to the radius, if you draw  perpendicular lines to the 2 straight lines at points P1 and P2, the intersection of these two perpendicular lines will at the center of the circle of which the arc P1-P2 is a part of the circumference.
Avatar of fornuftit

ASKER

OK, thanks. Does anyone have c# code for this?
Yer welcome :-) However, I don't program in C+ either - sorry!
Parts of your diagram are unclear.
I am assuming that the two lines are parallel to each other and to the X-axis.
Point P2 is drawn slightly above the second line, so I assume P2 in NOT on the line.
Are these assumptions correct?
SOLUTION
Avatar of Orcbighter
Orcbighter
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your support! Got it working!