[kde-edu]: Need help with this code

Kevin Krammer kevin.krammer at gmx.at
Mon Jul 11 19:30:47 CEST 2005


On Monday 11 July 2005 19:17, Albert Astals Cid wrote:
> Well, he really needs to rotate before translating, but that means puting
> the rotate line after the translate one due to mathematical things, that
> is, rotations and translations are done with matrix multiplications and the
> fact that matrix multiplications are done ┐right to left? meants you ahve
> to put them in the inverse order you want them to be applied.

As he rotates by 90 degrees it actually doesn't matter that much :)
Carsten had it mostly right, he rotated and then used the height value for the 
"x" coordinate.

Anyway.

rotate() rotates around (0, 0)

Therefore my mental shortcut is
- make the point where you want to rotate around to the new (0, 0)
- rotate

No need to remember how matrix multiplications work :)

Cheers,
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-edu/attachments/20050711/0e9086a4/attachment.pgp


More information about the kde-edu mailing list