Re: Vector rotation

From: Paul Kahler <phkahler_at_Oakland.edu>
Date: Tue May 15 2001 - 09:23:49 EDT

> How would I rotate this around 0,0? It'd be nice to know exactly how to do
> it. It has been so long since I've done any trig that my attempts so far
> have been laughable.

<pre>
You write the points (x,y) as column vectors and multiply by a
rotation matrix as follows:

 [x'] [c s][x]
 [y'] = [-s c][y]

where c and s are the cos(angle) and sin(angle). In english this is:

x' = c*x + s*y
y' = -s*x + c*y

Funny, I've seen Cinematronics code to do this very operation using
8 multiply instructions for each product - it's about a page of code.

Do we need to rehash the gravitaion calculations again? ;-)

--
 ___   __   _   _  _
|   \ /  \ | | | || |       phkahler@oakland.edu     Engineer/Programmer
|  _/| || || |_| || |__     " What makes someone care so much?
|_|  |_||_| \___/ |____)      for things another man can just ignore. " -S.H.
---------------------------------------------------------------------------
** To UNSUBSCRIBE from vectorlist, send a message with "UNSUBSCRIBE" in the
** message body to vectorlist-request@synthcom.com. Please direct other
** questions, comments, or problems to neil@synthcom.com.
Received on Tue May 15 09:42:21 2001

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:18 EDT