Inverse plane equation

Started by
16 comments, last by Radan 18 years, 9 months ago
Quote:Original post by Anonymous Poster
N % Transp (R) * Transp (Q) + N % Transp (T) + d = 0
[N % Transp (R)] * Transp (Q) + N % Transp (T) + d = 0



Hm... every thing is fine in the calculations apart for this step which just plain doesn't have any sense.

You can't just take out a composition out of a dot product.

N is a 1x3 matrix and R is a 3x3 matrix. I'm not familiar with a dot product between those two types of vectors, actuall there isn't one because they don't belong to the same vector space. Even if there was one the result is a scalar , i.e. a number which you're trying to compose with a matrix (compose not multiply). Multiplying matrices and multiplying a matrix with a scalar are two different operations.

Anyway, up to that point its all correct, but not after that.


To address the OP question:
what do you mean by the term neutral form?
Do you mean rotate the plane into one of the coordinate planes, or into a plane parrallel to one of the coordinate planes, or do you just wanna get a normalized equation of the plane(i.e. have its normal vector be unit length)?
-----------------Always look on the bright side of Life!
Advertisement
I'll give it a go :)...

Using the normal of your plane, cross it with the up vector (0,1,0) you get a front vector in plane space, cross that new front vector with the normal and you get your left vector in plane space.

From there build a 3x3 rotation matrix (assuming row major):

left.x   left.y   left.znormal.x normal.y normal.zfront.x  front.y  front.z


(edit: This matrix is a rotation matrix that would map, for example, the (0, 1, 0) vector on the normal vector, ie: world space to plane space).

Transpose it and there you go (note: you could transpose it on the fly... really ;) ;)).
There are a few gotchas to take care of like when the normal is already fairly close to the up vector you need to choose another axis to cross with etc... but it's very standard stuff and it works fine. Having said that, there could be a faster way to do it.

[Edited by - b34r on July 10, 2005 4:33:57 PM]
Praise the alternative.
Quote:Original post by A Guy from CRO
Hm... every thing is fine in the calculations apart for this step which just plain doesn't have any sense.

You can't just take out a composition out of a dot product.

N is a 1x3 matrix and R is a 3x3 matrix. I'm not familiar with a dot product between those two types of vectors, actuall there isn't one because they don't belong to the same vector space. Even if there was one the result is a scalar , i.e. a number which you're trying to compose with a matrix (compose not multiply). Multiplying matrices and multiplying a matrix with a scalar are two different operations.


You are very confuse, everything is correct perhaps you not say anything if you do not know linear algebra.

To raydog:
The last line is
Nr % Transp (Q) + dt = 0

About the representation, the Dot product of tow vector is and scalar operation, but It can be represent as a matrix multiplication, by representing the second as the transpose of the vector
say the symbol % is the operator dot product, then is a vector class the dot product of A and B is
Dot = A % B

In matrix form this is equavalient to
Dot = A * Transp (B)

However you do not do any conversion you just use you normal dot product function.

The reason is written like that is to make the demonstration consistent with the Law and principles of linear algebra.

JYK is right it is redundant to write
A % Transp (B),
however there is not harm in doing that, because in the implementation you will be using your dot product function.


Quote:Original post by b34r
I'll give it a go :)...

Using the normal of your plane, cross it with the up vector (0,1,0) you get a front vector in plane space, cross that new front vector with the normal and you get your left vector in plane space.

From there build a 3x3 rotation matrix (assuming row major):

left.x left.y left.z
normal.x normal.y normal.z
front.x front.y front.z

Transpose it and there you go (note: you could transpose it on the fly... really ;) ;)).
There are a few gotchas to take care of like when the normal is already fairly close to the up vector you need to choose another axis to cross with etc... but it's very standard stuff and it works fine. Having said that, there could be a faster way to do it.


I have not idea wha you are taking about what is say is the correct way of doing it, it follows from a rigorous prove.
new plane

Nr % Q + dist = 0

Where:
Nr = N % Transp (R)
dist = N % Transp (T) + d is the evaluation of the translation part of the matrix on

To transform a plane equation by a transformation matrix all you need to do is:

Take the translation part of the matrix is evaluate in the plane equation this is the new distance of the new plane equation.

Take the normal of the plane and inverse rotate by he rotation part of the matrix.
This is the normal of the new plane equation.
Made the same mistake again

Nr = N % Transp (R)
shoudl be

Nr = N * Transp (R)

Quote:Original post by Anonymous Poster

You are very confuse, everything is correct perhaps you not say anything if you do not know linear algebra.


I know very well what I'm talking about, however I'd be willing to acknowledge I'm wrong.

Now I'd be grateful if you'd clarify a point at a time.

First:
N is a normal vector (3 dimensional), it can be represented as a 3x1 matrix.
Transpose(R) is a 3x3 matrix.
% - dot product
Nr = N % Transpose(R).

Could you please define an example of one dotproduct operator on those two vectors? (please don't write standard dot product, describe it , at least in short).
-----------------Always look on the bright side of Life!
Quote:Original post by Anonymous Poster
I have not idea wha you are taking about what is say is the correct way of doing it, it follows from a rigorous prove.


Yes, and I have not idea wha you are taking about since you seem to be paid per word rather than per intelligible sentence.
I'm here to help not to be jumped on by some arrogant anonymous poster. In other words: I was not talking to you and probably never will. So put your oversized ego somewhere else than on my way. Thanks.

The method I gave works, yours certainly do (although, from what I gather, for a different problem) and everybody is happy.

Quote:
[munch munch munch]... This is the normal of the new plane equation.


Incidentaly we know the normal of the new plane equation as an input to the problem.

(edit: I'd like to clarify that this AP has been remotely getting on my nerves on numerous occasions, so it's not free flaming.)

[Edited by - b34r on July 10, 2005 8:18:11 PM]
Praise the alternative.
Quote:Original post by Anonymous Poster
Made the same mistake again

Nr = N % Transp (R)
shoudl be

Nr = N * Transp (R)


Thats more like it. This is ok.
-----------------Always look on the bright side of Life!

This topic is closed to new replies.

Advertisement