# Physics Simulation Forum

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Possibly not the easiest CG question ever? RotmatPosted: Fri Mar 13, 2009 8:29 am

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

 Posted: Tue Aug 11, 2009 10:47 am

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 2 posts ]

#### Who is online

Users browsing this forum: No registered users and 1 guest

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities