Translate 2 Coordinates into Angle  TOPIC_SOLVED

Trigonometric ratios and functions, the unit circle, inverse trig functions, identities, trig graphs, etc.

Translate 2 Coordinates into Angle

Postby kydjester on Mon Aug 30, 2010 3:26 am

Hello, I'm a newbie to math and I'm trying to work on a video game using XNA from microsoft - just really goofing off.

My problem is how do I Translate 2 coordinates to represent a degree (from 0 to 360).

So, the way it is - is , I have a Xbox Controller and the joystick reports back coordinates from -1 to 1 to X and Y. So in the middle it's Zero and the farthest Y is 1 lowest Y is -1 etc.

How can I take a coordinate like -.863x & -.521y and turn it into a degree between from 0 to 360 . And Vice Versa, how can I take the positive .863x & .521y and turn it to a degree from 0 to 360.

I've attached an image to help visualize: http://imgur.com/idxLu.jpg

Any help is appreciated! Thank you!
kydjester
 
Posts: 2
Joined: Mon Aug 30, 2010 12:06 am

Sponsor

Sponsor
 

  TOPIC_SOLVED

Postby stapel_eliz on Mon Aug 30, 2010 9:57 am

It sounds like you're wanting to convert the rectangular coordinates into polar coordinates, or at least to find the angle that you would have used for polar coordinates. To learn about how to do that conversion, try here. :wink:
User avatar
stapel_eliz
 
Posts: 1714
Joined: Mon Dec 08, 2008 4:22 pm

Re: Translate 2 Coordinates into Angle

Postby kydjester on Tue Aug 31, 2010 12:17 am

Thanks. This was the type of lead I was looking for.
kydjester
 
Posts: 2
Joined: Mon Aug 30, 2010 12:06 am


Return to Trigonometry

cron