Simple 2d Rotation

Started by
9 comments, last by lopar 24 years ago
This is a rotation formula:

x'=x*cos(ang)-y*sin(ang)
y'=x*sin(ang)+y*cos(ang)

x' and y' are the new pixels, and ang is the angle you want to rotate it by. Of course, you need a radian to degree function, but I think you get the idea. I hope this is what you wanted.

altair
altair734@yahoo.com
biggins.mit.edu/altair734

Edited by - altair734 on 4/11/00 4:04:27 PM
altairaltair734@yahoo.comwww.geocities.com/altair734

This topic is closed to new replies.

Advertisement