Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

A 3d plane is typically defined as a,b,c,d. Are a,b,c actually the x,y,z coordinates of a 3d vector, with d defining the rotation of the plane, something like axis-angle rotation data?

share|improve this question

3 Answers 3

up vote 21 down vote accepted

The four-variable representation of a plane is the coefficients in the equality

ax + by + cz = d

This can be seen as N = (a, b, c) being a normal vector and d being a distance from the coordinate origin (in units of N), and we can also write this equation as N·P = d, where P = (x, y, z).

This representation does not allow defining a specific “origin of the plane” — mathematical planes don't have origins. (However, it happens that since N·P = d we can set P = (d|N|-2)N and get a specific point on the plane: the point which is nearest the origin of the coordinate system.)

If you change the = to < or >, you describe a "half-space", which can be used for things such as an infinite floor in a physics engine; the opposite half-space is obtained by negating both N and d.

share|improve this answer
    
Good answer. Just one correction: d is more like a squared distance (unless (a,b,c) has length 1, which is often the case but not guaranteed). –  Sam Hocevar Sep 21 '12 at 14:02
    
@SamHocevar Squared? This is all linear. I think you're thinking of what I phrased as that d is in units of N. –  Kevin Reid Sep 21 '12 at 14:07
    
oh, it's all right then, sorry! –  Sam Hocevar Sep 21 '12 at 14:09

"Typically" is a quite subjective word, in my experience there are different way to describe a plane in a 3D space that are more common because of the properties that such constructions show.

About your question, there is away to use 4 real values to determine a plane in a 3D space. As you pointed out, a,b,c may be the components of a vector that is perpendicular to the desired plane. If N =(a,b,c) is our perpendicular vector, you may find a point in your plane that is P = d N for some d real and positive. Here you say that d is the distance from the origin in term of N; if N is a unit vector, then d is the distance between the origin and your plane in the way that the term "distance" is commonly meant.

Surprisingly you can define any possible oriented plane bacause you can use a negative values of d; doing so you loose the direct meaning of d as distance until you put it in an absolute value (|d|).

share|improve this answer
2  
"Typically" is a subjective word. "Tipically" isn't a word of any kind. (Sorry for nitpicking, but I couldn't resist since you even went and emphasized it.) –  Ilmari Karonen Sep 21 '12 at 18:52

As far as I know a plane is usually defined by a position, for telling us where the origin is, and a normal pointing upwards from the plane to tell us what orientation we have. It's common practice to use two vectors for this.

With four variables you don't have enough variables to define a plane that doesn't have an origin at (0,0,0) or not enough variables to account for all rotations.

The minimum we would need for a plane in 3D euclidean space with an origin that's not at (0,0,0) and can be oriented in anyway we want is 5. Imagine the unit sphere, we need 3 variables to define where the origin of the unit sphere is (X,Y,Z). Then we need two variables to define where the 'up' of the plane is. We can do this by using the vector described by going from the origin of the sphere towards it's surface given a latitude and longitude.

How you would reconstruct a plane with only four variables I don't know. Maybe you're working in a narrow domain (the plane is always at (0,0,0) and the four variables are a quaternion?) or the variables aren't scalars? In what context are you using this a,b,c,d?

share|improve this answer
    
A plane is usually defined as normal/distance or the four scalars (which is basically the same thing). There is no point because the fourth scalar (the distance from origin) equals dot(point,normal), which is also the most common way to interact with planes (checking which side a point is on / how far is it from the plane) and thus must be the most optimal (no one wants to recalculate the distance in each test). –  snake5 Sep 21 '12 at 13:39
    
I had no idea! I still don't see how you would get all orientations in that case. Could you expand your comment to an answer, that would benefit us all :). Oops, didn't see FXIII's answer –  Roy T. Sep 21 '12 at 13:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.