[gameprogrammer] Re: Rotation matrix for 2D point
- From: tran nhat khanh <nhatkhanh1984@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Tue, 7 Sep 2004 05:43:48 -0700 (PDT)
The general affine transformation:
x2 x1
= A x + B
y2 y1
Pure rotation uses the A matrix and is defined as (for
positive angles being clockwise rotations):
cosa -sina
A =
sina cosa
0
B =
0
Here, we are working in image coordinates, so the y
axis goes downward.
Or:
x2 = cosa * (x1 - x0) - sina * (y1 - y0) + x0
y2 = sina * (x1 - x0) + cosa * (y1 - y0) + y0
(where (x0,y0) are the coordinates of the center of
rotation (in the input image) and "a" is the angle of
rotation with clockwise rotations having positive
angles.)
--- Mario de Sousa <mcd@xxxxxxxxxxxxx> wrote:
> Hey, guys.
>
> Would anyone be so kind as to give me the rotation
> matrix for a 2d point. I can't remeber which trig
> function goes where and my internet proxy is down at
> the moment.
>
> Thanks in advance.
>
> Mario de Sousa
>
>
> ---------------------
> To unsubscribe go to
> http://gameprogrammer.com/mailinglist.html
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Rotation matrix for 2D point
- From: Mario de Sousa
Other related posts:
- » [gameprogrammer] Rotation matrix for 2D point
- » [gameprogrammer] Re: Rotation matrix for 2D point
- [gameprogrammer] Rotation matrix for 2D point
- From: Mario de Sousa