Plane Equation

Started by
37 comments, last by haegarr 17 years, 11 months ago
Because you self know this so well you explain it in a higher knowing level that you understand.
But I need to get to know the basics first.

Quote:Original post by Illco
Quote:Original post by programering
What's colinear?

It means the vectors directions are the same, regardless of their length. So for example, two vectors (0,1,0) and (0,100,0) are colinear. That is not the whole story: (0,1,0) and (0,-1,0) are also colinear as their directions are on the same line, and you might abusingly think of the one as the other with negative length.

Good explaination, I get it, thanks!

Quote:Original post by Illco
Quote:Original post by programering
What does "co" stand for?

It's a prefix to indicate the term colinear relates two a pair of vectors rather than a single one. Think in general of co-pilot, co-driver, co-operate, etc.

Ok.

Quote:Original post by Illco
Quote:Original post by programering
What's tangential? Is it touching?

Yes it's touching. If you have a parabola then the tangent on the top will be horizontal, for example.

parabola? Is it the TV receiver of the satelite?

Quote:Original post by Illco
In this case, the explanation tries to tell the following. Normally, for an arbitrary curved surface, to compute the normal vector you would require two vectors that are tangents of the surface i.e. touching it's curvature. The tangents are orthogonal to each other as well as to the normal.

What's arbitrary? I couldn't find it in the game dictionary.
So to get the normal of a curved surface you take the cross product from two tangential vectors that touches the surface in both ends.

Quote:Original post by Illco
Quote:Original post by programering
What does the "surface is planar" mean?

It means the surface is not curved, but flat. If you would have an infinitely flat plane, you could position such that it fits together with any planar surface. You cannot do this with non-planar surfaces, as the curvature will at some point move away from your infinite plane.

Ok.

Quote:Original post by Illco
In this case, since the surface is planar, it is not required that the two vectors for computing the normal are orthogonal to each other; any two actually different (non-colinear) vectors in the plane will do.

Google Search: ortogonal vector

Quote:Original post by Illco
Actually a flat plane is a tautology: planes are always flat whereas surfaces can be curved.

Ok.

Quote:Original post by Illco
Quote:Original post by programering
Shall it be integers or real numbers as float and double?

In general these computations are done using floating-point numbers, so stick to those for now.

Ok.

Quote:Original post by Illco
Quote:Original post by programering
What does "w.r.t. points" means?

It means "with respect to points" i.e. how the term coplanar should be interpreted in the context of points.

BTW, what does "i.e." stand for?

Quote:Original post by Illco
FYI: coplanar points are points lying in the same plane. So any two points will be coplanar, as will be any three points but not any four points (in R^3, naturally).

I understand.
FYI ? For Your Information?

I think I get it now :-).

A*x + B*y + C*z + D = 0

A, B, and C are the point of the normal. Uppercase for point vectors.
x, y and z are the direction of the normal. Lowercase for direction vectors.
D is the dot product of the point and direction vectors which returns the
distance for the space origin to the plane.

If (A*x + B*y + C*z + D) < 0, then the point is?
If (A*x + B*y + C*z + D) = 0, then the point is in the plane.
If (A*x + B*y + C*z + D) > 0, then the point is?
Advertisement
I'm not going to try and answer all the questions about planes because I'm not that solid on the math, but I'll help out by answering some of the definitions you're having problems with.

Quote:parabola? Is it the TV receiver of the satelite?

A parabola is simply any curve fitting the equation: y = ax^2 + bx + c

Quote:What's arbitrary? I couldn't find it in the game dictionary

Arbitrary is a general term meaning any one out an infinite number of possibilities. So an arbitrary curve surface would be any curved surface you can think of.

Quote:BTW, what does "i.e." stand for?

i.e. is a latin abbreviation. It is short for id est, which means 'that is'. So when someone says i.e. they are basically just clarifying a statement they just made. Similarly, the abbreviation e.g. is short for 'exempli gratia' and means 'for example'. From wikipedia:
Quote:Exempli gratia (e.g.) and id est (i.e.) are commonly confused and misused in colloquial English. The former, exempli gratia, means "for example", and is used before giving examples of something ("I have lots of favorite colors, e.g., blue, green, and hot pink"). The latter, id est, means "that is", and is used before clarifying the meaning of something, when elaborating, specifying, or explaining rather than when giving examples ("I have lots of favorite colors, i.e., I can't decide on just one"). Both "e.g." and "i.e." should generally be followed by a comma, just as "for example" and "that is" would be.


FYI does mean For Your Information.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

I'm just sort of jumping in here without having read the whole thread, but...
Quote:Original post by programering
A, B, and C are the point of the normal. Uppercase for point vectors.
x, y and z are the direction of the normal. Lowercase for direction vectors.
D is the dot product of the point and direction vectors which returns the
distance for the space origin to the plane.
The terminology you're using there seems a little confused (it may just be a language issue). The difference between points and vectors can be a little slippery, but in the plane equation, (A, B, C) is a vector, otherwise known as the plane normal, and (x, y, z) is any point. Those points (that is, values for x, y and z) for which the equality holds are on the plane.

Your definition of D is pretty close. In this particular form of the plane equation, it's actually the negative of the dot product of any point known to be on the plane, with the plane normal (the term normal is preferred to 'direction vector' here). If the normal is unit length, D is in fact the (signed) distance from the origin to the plane.

And:
Quote:If (A*x + B*y + C*z + D) < 0, then the point is behind the plane
If (A*x + B*y + C*z + D) = 0, then the point is in the plane.
If (A*x + B*y + C*z + D) > 0, then the point is in front of the plane
Where 'behind' and 'in front' refer somewhat informally to the negative and positive half-space associated with the plane.
Quote:Original post by jyk
I'm just sort of jumping in here without having read the whole thread, but...
Quote:Original post by programering
...
The terminology you're using there seems a little confused (it may just be a language issue). The difference between points and vectors can be a little slippery, but in the plane equation, (A, B, C) is a vector, otherwise known as the plane normal, and (x, y, z) is any point.

Yes, and sorry for that little confusion. Perhaps I have introduced it because I have not mentioned explicitely that I write vectors in bold weight, hence position vectors are written as bold uppercase letters and direction vectors as bold lowercase letters in my replies above (as in any post I've done on GDnet). Scalars, on the other hand, are written in normal weight by me.
This thread rocks.

So for the normal that defines the plane (N) and a point (p) with vector (p - 0 = P) and (d) is some scalar distance.

N . P = d

defines some plane.

And ( Nx, Ny, Nz, -d ) is the four-component plane equation.
Quote:Original post by Boder
So for the normal that defines the plane (N) and a point (p) with vector (p - 0 = P) and (d) is some scalar distance.

N . P = d

defines some plane.

Yes. But the above use of uppercase and lowercase letters for vectors is reverse to my use in previous replies. In the notation of previous replies it would look like
n . p == d w/ p := P - 0
(read it as "vector n dot vector p is identical to scalar d with p being defined as the difference of point P and the origin point 0").

Notice please that both the normal and the distance is needed to define a plane, while the point is a variable. The definition means verbosely "a plane is build of all those points in the 3D space that fulfil the plane equation; any point not fulfilling the plane equation lies outside the plane, either in the "positive halfspace" (w.r.t. the direction of the planes normal) or in the "negative halfspace".

Quote:Original post by Boder
And ( Nx, Ny, Nz, -d ) is the four-component plane equation.

The tuple defines the parameters of a kind of plane equation. The equation itself is
nx*px + ny*py + nz*pz - d == 0
with px, py, and pz being the variables of the equation.
I have read some articles here to better understand this.

Is this true?:

  • One normalize both the normal's
    point vector <A,B,C> and
    the direction vector <x,y,z>
    to make them unit vectors with
    the magnitude/length of 1.

  • The Cross Product of two vectors
    returns a vector orthogonal/perpendicular/
    (right angle)/(90 degrees) to both.



[Edited by - programering on April 24, 2006 3:53:40 PM]
Quote:One normalize both the normal's
point vector <A,B,C> and
the direction vector <x,y,z>
to make them unit vectors with
the magnitude/length of 1.
Where did you get this exactly? Is it an excerpt from an article or tutorial?
Quote:Original post by jyk
Quote:One normalize both the normal's
point vector <A,B,C> and
the direction vector <x,y,z>
to make them unit vectors with
the magnitude/length of 1.
Where did you get this exactly? Is it an excerpt from an article or tutorial?

A Texture Mapping Technique
Why? Is it wrong?
The following answers may seem nitpicking, but look at all the related problem posts arised here in GDnet, and you will see the sense. I'm not a mathematician, so I may be unprecise but hopefully not wrong in the one or other formulation.

Quote:Original post by programering
  • One normalize both the normal's
    point vector <A,B,C> and
    the direction vector <x,y,z>
    to make them unit vectors with
    the magnitude/length of 1.

The distinction between position vectors and direction vectors could be done in two ways: Either using homogeneous co-ordinates or by defining a suitable vector algebra (say rules like "a point minus a point results in a direction"). Using the homogeneous co-ordinates has IMHO the advantage to see some things directly.

If you apply the length formula to a position vector in homogeneous co-ordinates you get
sqrt( x2 + y2 + z2 + 12 )
what actually is the length of the vector in a mathematical sense but not the value you are looking for. What you want to see instead is the "distance of the point from the origin"!

On the other hand, computing the same for a direction vector will yield in
sqrt( x2 + y2 + z2 + 02 )
what is okay.

Computing the length of the difference vector of a point P := (x y z 1) and the origin 0 := (0 0 0 1)
|P - 0| = | ( x-0 y-0 z-0 1-1 ) | = sqrt( x2 + y2 + z2 )
does the trick.

Compare this with the rule I gave as example for a vector algebra rule above: "a point minus a point results in a direction". See that exactly that is done here!!

Now, we could also do the normalization step. Let us define
d := |P| = sqrt( x2 + y2 + z2 + 1 )
and apply that to yield in
P' := P / d = ( x/d y/d z/d 1/d )
The length of this vector is 1. Okay, now let us compute the affine vector from it:
( x y z )
Err, is that a vector of length 1? No, of course not.

In other words: A position vector is not suitable to compute a length from. If you say "I compute the length of a vector" you ever mean "of a direction vector". If you say "I compute the length of a position vector" you are wrong; what you wanted to say is "I compute the distance of a point from the origin" and you mean "I compute the length of the difference vector of the point from the origin".

Similarly, a normal is a direction vector and hence does not have an associated position. So the term "the normal's point vector" from the OP is also not correct. You could convert a direction to a point only by adding the direction to a point (notice that this is just an equivalence transformation of the one rule of the algebra I have given above!).

In summary, IMHO there are 2 mistakes in the cited sentence above.

Quote:Original post by programering
  • The Cross Product of two vectors
    returns a vector orthogonal/perpendicular/
    (right angle)/(90 degrees) to both.

This is true in many cases but not in general. To be true both original vectors
(a) must not be of zero length, and
(b) must not be co-linear.
You have isolated the sentence from its original context, and perhaps the context have decribed a situation where that conditions were fulfilled.

This topic is closed to new replies.

Advertisement