Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / calculating intersection points of 2 circles

Author
Message
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th Oct 2009 18:31 Edited at: 9th Oct 2009 20:29
Hi everyone!

How do I calculate the intersection point of two circles if I know the x,y position and the radius of both?

Thanks, TheComet

EDIT:

I found these formulas:

Quote: "Point of intersection when given the two circles whose equations are ((x-x1)*(x-x1))+((y-y1)*(y-y1))=r1*r1 and ((x-x2)*(x-x2))+((y-y2)*(y-y2))=r2*r2:





"


Now, what does that equation bit mean?


Make the paths of your enemies easier with WaypointPro!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Oct 2009 01:55 Edited at: 10th Oct 2009 02:10
Looks like a quadratic equation to me, I'll try to code it out.


All done, here ya go. It'll show the two intersections of the circles.



TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Oct 2009 17:03
Thanks a lot! I'll try it out.

TheComet


Make the paths of your enemies easier with WaypointPro!

Login to post a reply

Server time is: 2024-05-04 00:24:20
Your offset time is: 2024-05-04 00:24:20