OpenGL/DirectX w Coordinate

What exactly does the w coordinate do in OpenGL, or DirectX? Google appears to be no help in this situation I have not really understood any of the answers I have found using Google and several answers condradict each other. So can someone please explain to me exactly what the 'w' coordinate does in the xyzw coordinate system used by OpenGL and DirectX. Thanks for any help.
You could at least share your thoughts, post those opposite answers, something...

Look for projective space.
They would facilitate translation (you can have a transformation matrix)
Also, NURBS
you can describe points and vectors using homogenous coordinates.

In homogenous coordinates a Point (x,y,z) is equivalent to (x,y,z,1) and a vector (x,y,z) is given by (x,y,z,0).

Like this you can distinguish points from vectors and this helps a lot when transforming points or vectors using transformation matrices. A translation for example transforms only points, not vectors.

In general if you've got a quadruple (x,y,z,w), it is equal to a vector (x,y,z) if w is zero, and otherwise it is equal to the point (x/w, y/w, z/w,1) = (x/w, y/w, z/w).

For more detailed information i suggest to search wikipedia or other websites for terms like homogenous coordinates, projective space or transformation matrices.
So basically, a vertex array would be in the format "x y z w x y z w x y z w...." and all of the 'w's would be equal to 0 because the vertex array is an array of points and not vectors?
As AleaIactaEst mentions a point is (x,y,z,1) so all the 'w's would be 1 in this case.

The homogenous coordinate system allows all transformations (rotations, other linear transformations, translations and projections) to be represented by a 4x4 matrix. This standardises the way transformations are represented, instead of having different objects to represent different types of transformation.

Ok I see now, I misread his post. Thanks.
Topic archived. No new replies allowed.