Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Mar 13, 2009 8:29 am 
Offline

Joined: Tue Feb 03, 2009 10:04 am
Posts: 15
Hello, I took a CG-course at my university some years ago, so I did known the answer on this question but now I have forgotten it... Can someone please tell me how the rotation matrix worked.

Let's say we have a 2D system the we make a 3-dim rotation matrix, and we add a 1 in all our vectors to be able to calculate with them:

T = [r1 r2 tx, r3 r4 ty, s1 s2 sc] v = [x, y, 1]
r1 - r4 is the rotation cos -sin and so on, dx dy is translation in x and y.
But to my recollection s1, s2 were scew and sc where scale. However when I do the calculations:
T*v = [r1*x+r2*y+tx*1, r3*x+r4*y+ty*1, s1*x+s2*y+sc*1] = v2

So the translation works fine here, and also the rotation. But since this only is a 2d system didn't one just throw away the last element in the v2 vector? which is the one including the scew and the scale variable...

What am I missing?


(I write ',' for new line i.e:
T = [
r1 r2 tx
r3 r4 ty
s1 s2 sc
]


//Markus

PS. Placed it in this forum because it's a strictley mathematical problem


Top
 Profile  
 
PostPosted: Tue Aug 11, 2009 10:47 am 
Offline

Joined: Thu Jan 11, 2007 7:45 pm
Posts: 15
norm the result by dividing by the last component (unless it's zero). it is generally easier to work with normed matrices which have sc = 1. the skew part sort of makes things difficult otherwise all your elements stay normed.

i for one like to distinguish between elements with the last component 0 (which are not affected by translation), which i think of as 'vectors' (since the space we are thinking in is 1 dimension less) and elements with the last component 1, which i think of as 'vertices' (so that 'vertex' - 'vertex' -> 'vector'). but i obviously haven't thought this through when you have a skew part.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group