# Rotating a rectangle

This topic is 3770 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi guys. Is there a simple way to rotate a rectangle and keep track of the coordinates of each of the corners? Say for example we had a rectangle whoes corners were (0,0) (0,10) (5,10) (5,0). And if we were to rotate the rectangle by 45degrees clockwise. Is there a simple way to use that data to generate the new coordinates of the corners? I'm working on a device with no fixed point or floating point support, but I can work around that if I got some general idea of how to approach the problem. Thannks -Woody

##### Share on other sites

So if i read it correctly to get the new coordinate of the rotated x coordinate
is :
x(cos of the angle to rotate) + y(sin of the angle to rotate)

Thanks again,
-Woody

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 9
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
633331
• Total Posts
3011394
• ### Who's Online (See full list)

There are no registered users currently online

×