Jump to content
  • Advertisement
Sign in to follow this  
dev578

Trouble with some geometry

This topic is 3939 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have two points, p1 and p2, and I know both of their coordinates. P2 is the center of a circle with radius x. Two tangent lines from the circle formed by p2 intersect at p1. I need to know the angle these two lines make. To clarify, if I made an arrow from p1 to p2, it would cross through the center of the angle I am looking for. I really do hate asking questions, but I don't really know how to research this one. Any help would be appreciated. Thank you, -dev578

Share this post


Link to post
Share on other sites
Advertisement
Draw the circle, the points, and the tangent lines. You know the tangent lines and the circle radius are at right angles, hence you have a right triangle (two actually but the problem is symmetrical so you only need to pick one). You also know two sides, the radius of the circle and the distance between P1 and P2. From there you should be able to use trigonometric identities to determine the angle.

Share this post


Link to post
Share on other sites
Oh, that was easy. Sorry, sometimes I overcomplicate things without seeing a simple solution. Thank you for your time.

-dev578

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!