Jump to content
  • Advertisement
Sign in to follow this  
Taha Ansari

How to find end points of a chord, given the angle and a single point on line

This topic is 4606 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'm facing a problem; basically, what I want to know are the end-points of a line that touches two points on a circle (i.e. a chord). I have the following data: - Angle at which line is being drawn - A single point on line [also, I use this point and the angle to draw the line] - Center point of circle - Radius of circle I need this because I want to limit the chord end-points from exceeding edges of the circle. First, I draw the line, then I need to make this check, if the line is exceeding circle edges, clamp. The question is clear in my mind, if I'm not expressing it correctly, or more info is required, then let me know. Thank you all for your time..

Share this post


Link to post
Share on other sites
Advertisement
umm..what is r2 (r square)? is it the radius of the circle?

And thank you for this link, it is very useful..

[EDIT: Radius was 'r'.. had pictures disabled on my browser and didn't explicitly enable that one..[smile]]

[Edited by - Taha Ansari on January 4, 2006 5:51:43 AM]

Share this post


Link to post
Share on other sites
I finally got it to work- I was trying the formula mentioned but hadn't read the part where it said circle had origin 0,0. When I took that into account, it worked like a...something that works a-ok.

Thank you very much Sneftel..

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!