Jump to content
  • Advertisement
Sign in to follow this  
fguihen

displacing a point by an angle and distance to get a 3rd point

This topic is 4912 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

right. i have point a at (20,20). i have an angle of 45 degrees. i have a distance of 10. how do i displace the point by the distance and angle? [Edited by - fguihen on February 7, 2005 12:45:27 PM]

Share this post


Link to post
Share on other sites
Advertisement
Depends on which angle you're talking about.

If you're talking about angle a, as it looks like from the diagram, then you can't, since the third point is not determined.

You need to know angle c instead, though I can't tell you how to do it off the top of my head.

Share this post


Link to post
Share on other sites
o, sorry, the length of the line to the unknown point is ten, as is the length of the line between the known points

Share this post


Link to post
Share on other sites
Is it a circle ? a right triangle ? give us more info...
Which "known points" are you talking about ? you've only gave us one point, not two...
Rephrase please...

Share this post


Link to post
Share on other sites
If you want to displace the point 10 units at an angle of 45 degrees, you have to convert 10, 45 degrees into cartesian coordinates. In laymens terms, you have to find out how far away on the X axis and on the Y axis 10, 45 is from your original point. The distance on the X axis is (cos 45) * 10, and the Y is (sin 45) * 10. All you have to do is add the X value to the X axis and the Y value to the Y axis, and then you're set. For posterity, the formula is: X Value + ((cos Angle) * Distance), Y Value + ((sin Angle) * Distance).

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!