Sign in to follow this  
Deeza

Rotating 2D Vectors

Recommended Posts

Hello, I've been trying to understand the math behind rotating 2D vectors for some time now and I can't seem to figure it out. I've been reading up on Sine and Cosine, and I feel like I've learned more about them, but it still doesn't help me with this specific issue. I don't like using things without understanding them, so hopefully someone can post an explanation. If you also know of any good books/sources that explain this, I'd appreciate if you posted them. The formula: x' = cos(theta)*x - sin(theta)*y y' = sin(theta)*x + cos(theta)*y Thanks

Share this post


Link to post
Share on other sites
I am not sure how much you understand about sin and cos but I am a pretty dumb guy myself and it took me a while before I got this concept.

Think about a Cartesian coordinate system where you can plot a point at (x,y).

Now imagine a unit circle whose radius is 1. Cos is similar to "x" and Sin is similar to "y". The Cos and Sin functions give you the x,y coordinate on the edge of the unit circle.

So as you can imagine, if you continue to increase the angle input for Cos and Sin, the new points x1 and x2 will draw a circle as expected which leads into rotation. Sorry, I hope that makes sense.

Share this post


Link to post
Share on other sites
The pdf smitty presented you with is a good explanation. However I would highly recommend you purchase the following book.

"3D Math Primer for Graphics and Game Development"
By: Fletcher Dunn and Ian Parberry
# ISBN-10: 1556229119
# ISBN-13: 978-1556229114

You can purchase the book at amazon if you follow the link below.
http://www.amazon.com/Primer-Graphics-Development-Wordware-Library/dp/1556229119/ref=sr_1_1?ie=UTF8&s=books&qid=1201635348&sr=8-1

Chapter 7 and 8 would be of especial interest to you I believe.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this