|
-
Apr 28th, 2009, 05:32 PM
#1
Thread Starter
KING BODWAD XXI
[RESOLVED] Rotate Rectangle positioning maths
-
Apr 28th, 2009, 06:23 PM
#2
Re: Rotate Rectangle positioning maths
Have you tried looping for x between -Width/2 and Width/2, and similarly for y between -Height/2 and Height/2?
Last edited by jemidiah; Apr 29th, 2009 at 12:38 AM.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Apr 29th, 2009, 01:23 AM
#3
Thread Starter
KING BODWAD XXI
Re: Rotate Rectangle positioning maths
Woohooo thank you. You dont know how many times I have comiled and tested that code to no avail. In fact I think the only code I didnt change was the for loops lol
Thankyou )
-
Apr 29th, 2009, 02:29 AM
#4
Re: [RESOLVED] Rotate Rectangle positioning maths
lol, no problem, glad it's working so quickly
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Apr 30th, 2009, 04:26 AM
#5
Re: [RESOLVED] Rotate Rectangle positioning maths
The general recipe for rotating any polygon around a specific point is to move the coordinate system origin to this point, do the rotation and then restore the coordinate origin.
Namely, you first subtract the coordinates of the point from the coordinates of the polygon vertices, apply the rotation and add the point coordinates to those of the resulting vertices.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|