Math problem with linear transformations

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
SpaceDude
Bronze Sponsor
Bronze Sponsor
Posts: 822
Joined: Thu Feb 02, 2006 1:49 pm
Location: Nottingham, UK
x 3
Contact:

Math problem with linear transformations

Post by SpaceDude »

I have a math problem to do with linear transformations.

Suppose I have a plane defined by a point, P, which lies on the plane and the plane's normal, N.

And I have a linear transformation defined by a 3x3 matrix. The question is, how can I apply this linear transformation to the plane? I can apply the linear transformation to the point P simply by multiplication but I can't do the same with the Normal because it won't give me what I want.

One solution I thought of is to pick 3 points lying on the plane, apply linear transformations to these 3 points and calculate the new plane normal by cross product. But there must be a more direct way, I just can't figure it out :?. Any help would be greatly appreciated.
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Post by Mikachu »

I think the best would be to only apply the rotational part of your linear transformation to the plane's normal. Translations and scaling shouldn't affect a normal.
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
SpaceDude
Bronze Sponsor
Bronze Sponsor
Posts: 822
Joined: Thu Feb 02, 2006 1:49 pm
Location: Nottingham, UK
x 3
Contact:

Post by SpaceDude »

Mikachu wrote:I think the best would be to only apply the rotational part of your linear transformation to the plane's normal. Translations and scaling shouldn't affect a normal.
Yes but how? I've used polar decomposition in the past but it's very complicated and I'm not sure it would work in this case anyway.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Post by Kojack »

Try applying the matrix to the point on the plane, and the transpose of the inverse of the matrix to the normal. Like in this article: http://www.unknownroad.com/rtfm/graphic ... rmals.html
I haven't tried it, but looks like what you'd want (the article was for 4x4, but should still work).
User avatar
SpaceDude
Bronze Sponsor
Bronze Sponsor
Posts: 822
Joined: Thu Feb 02, 2006 1:49 pm
Location: Nottingham, UK
x 3
Contact:

Post by SpaceDude »

Kojack wrote:Try applying the matrix to the point on the plane, and the transpose of the inverse of the matrix to the normal. Like in this article: http://www.unknownroad.com/rtfm/graphic ... rmals.html
I haven't tried it, but looks like what you'd want (the article was for 4x4, but should still work).
Great thanks! just what I need with a good explanation. I owe you one.
Post Reply