AffineTransform rotation question

H

hilz

Hi all:
I have an AffineTransform that has a uniform scale(x scale == y scale). How
can i get the rotation portion of it, or the rotation angle "theta" ?

One suggestion was to scale it by the square root of the determinant of the
matrix, and set the translate portion to 0,0 but that does not seem to give
correct values.
Can anyone please tell me what do i need to do to get the theta ?
thanks
hilz
 
T

Thomas Weidenfeller

hilz said:
I have an AffineTransform that has a uniform scale(x scale == y scale). How
can i get the rotation portion of it, or the rotation angle "theta" ?

Just apply the transformation to two simple points P0(0,0), P1(1,0). The
resulting P0' and P1' will allow you to determine everything you want to
know with elementary math.

/Thomas
 
H

hilz

Thomas Weidenfeller said:
Just apply the transformation to two simple points P0(0,0), P1(1,0). The
resulting P0' and P1' will allow you to determine everything you want to
know with elementary math.

/Thomas

Thank you Thomas.
That was simple yet effective!
I am new to this area and i am experimenting with it.Your suggestion opened
my eyes to a lot of things!
thank you.
hilz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,330
Latest member
AlvaStingl

Latest Threads

Top