Avatar of fornuftit
fornuftit
Flag 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
.NET ProgrammingMicrosoft DevelopmentAlgorithms

Avatar of undefined
Last Comment
fornuftit

8/22/2022 - Mon
Paul Sauvé

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.
fornuftit

ASKER
OK, thanks. Does anyone have c# code for this?
Paul Sauvé

Yer welcome :-) However, I don't program in C+ either - sorry!
Your help has saved me hundreds of hours of internet surfing.
fblack61
Orcbighter

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
Orcbighter

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
fornuftit

ASKER
Thanks for your support! Got it working!