I am searching somebody that could explain me how to use a rotation matrix

on a Surface to make 2D rotations.

I know a lib called SGE that implements this features, but I want to learn

how to do it myself.

And if somebody have URL, I would agree too :)) .

bye bye

Err, it’s not strictly an SDL question, but maybe this’ll get you

started …

given point x, y (rotating about the origin):

new_x = x * cos(angle) - y * sin(angle);

new_y = x * sin(angle) + y * cos(angle);

it’s not using a matrix of any sort but that’s the math to rotate a

single point around the origin, which i used to make a simple rotate

surface function. also, this way requires some simple anti-aliasing as

the math doesnt correctly fill in rotated images (you end up w/ "holes"

in ur rotated images).

that help at all?On Tue, 2002-08-20 at 02:30, carlos wrote:

I am searching somebody that could explain me how to use a rotation matrix

on a Surface to make 2D rotations.

I know a lib called SGE that implements this features, but I want to learn

how to do it myself.

And if somebody have URL, I would agree too :)) .

bye bye

Here’s URL:

http://mathworld.wolfram.com/RotationMatrix.html

I hope it helps.

JacekOn Tue, Aug 20, 2002 at 11:30:09AM +0200, carlos wrote:

I am searching somebody that could explain me how to use a rotation matrix

on a Surface to make 2D rotations.

I know a lib called SGE that implements this features, but I want to learn

how to do it myself.

And if somebody have URL, I would agree too :)) .

–

±------------------------------------+

|from: J.C.Wojdel |

| J.C.Wojdel at cs.tudelft.nl |

±------------------------------------+

Here’s URL:

http://mathworld.wolfram.com/RotationMatrix.html

Here’s another one that looks good at a glance:

http://www.makegames.com/3drotation/

Google is overflowing with good information on this.

–ryan.