Re: Vector rotation

From: Christopher X. Candreva <chris_at_westnet.com>
Date: Tue May 15 2001 - 08:51:39 EDT

On Mon, 14 May 2001, Neil Bradley wrote:

> While not 100% on topic but distantly related due to my attempted vector
> activities, how does one rotate a 2D vector around a common point? Let's
> say I had a list of vector points:

The general equations for rotation of a point (X,Y) around a pivot (Xp,Yp)
through T degrees is:

X' = Xp + (X - Xp)cos(T) - ( Y - Yp)sin(T)
Y' = Yp + (Y - Yp)cot(T) + ( X - Xp)sit(T)

> How would I rotate this around 0,0? It'd be nice to know exactly how to do

For the special case of rotation around the origin, this reduces to:
X' = X cos(T) - Y sin(T)
Y' = Y cos(T) + X sin(T)

(Yeah keeping notes from a college graphics class ! I may have to read this
again -- now it's more of a history lesson, and I only took this class in
1989 !

==========================================================
Chris Candreva -- chris@westnet.com -- (914) 967-7816
WestNet Internet Services of Westchester
http://www.westnet.com/

---------------------------------------------------------------------------
** 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:18:35 2001

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