Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to figure this out for player movement in a video game but I'm having trouble figuring it out: How do I find a point $(x_1,y_1)$ if I have an origin point $(x_0,y_0)$, a distance, and $\theta$?

share|improve this question
    
Voted to close....... –  user9413 Jun 11 '11 at 16:38
1  
What is $\theta$ relative to? The $x$-axis, the $y$-axis, clockwise, anticlockwise...? –  Rahul Jun 11 '11 at 17:28
    
x axis, counter clockwise –  Xavier Jun 11 '11 at 17:38

1 Answer 1

Use the following formulas: $$ x_1 = x_0 + d\cos\theta\qquad\text{and}\qquad y_1=y_0 + d\sin\theta. $$

share|improve this answer
    
Thank you. Do these formulas have a name or something I can use to reference them by? –  Xavier Jun 11 '11 at 16:58
1  
@Xavier: If the origin is at (0,0), the point at distance $r$ and angle $\theta$ is at $(r\cos\theta, r\sin\theta)$. This can perhaps be called changing from polar coordinates to rectangular coordinates. Taking the origin at $(x_0,y_0)$ instead is just a translation. –  ShreevatsaR Jun 11 '11 at 19:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.