Jump to content

  • Log In with Google      Sign In   
  • Create Account

W-Axis?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 samgj   Members   -  Reputation: 398

Like
0Likes
Like

Posted 01 April 2013 - 10:29 AM

I was reading the Red Book and they mentioned a W-Axis for vertices, it was not described very well but they said it's 1.0 by default. I have an interest in Forth-Dimensional geometry and in that the w-axis is the forth dimension. Is this what it's for or is this something different?


MLNM-ONE: open source video game engine

Unincorporated Media's Website: my company's website


Sponsor:

#2 OandO   Members   -  Reputation: 755

Like
0Likes
Like

Posted 01 April 2013 - 11:02 AM

Search for "homogenised coordinates" for a full explanation. The overly simplified version is that it makes 4x4 matrix calculations work.



#3 blueshogun96   Crossbones+   -  Reputation: 914

Like
0Likes
Like

Posted 01 April 2013 - 05:04 PM

Tbh, there's no such thing as "4th dimensional geometry".  As OandO has already stated, the W coordinate is for homogenized coordinates.  Chances are, you won't have to worry about homogenized coordinates in OpenGL (assuming you're in the beginning stages), unless you are getting in depth with your matrix calculations.

 

Try reading this article: http://fly.cc.fer.hr/~unreal/theredbook/appendixg.html

 

In the past, for Direct3D, using using the reciprocal of homogeneous (or should I say RHW) was commonly used as a cheap way of implementing 2D geometry in 3D.  

 

Hope this helps

 

Shogun.


Follow Shogun3D on the official website: http://shogun3d.net

 

blogger.png twitter.png tumblr_32.png facebook.png

 

"Yo mama so fat, she can't be frustum culled." - yoshi_lol


#4 Tournicoti   Prime Members   -  Reputation: 683

Like
0Likes
Like

Posted 02 April 2013 - 01:13 AM

Hello

 

The vertex expressed in homogeneous coordinates (x ,y ,z ,w) is the same vertex expressed in cartesian coordinates (x/w, y/w, z/w)

 

w is set to 1.0 for vertices because it permits to avoid to do the division by w when dealing with affine transformations.

But when dealing with perspective projections, w can become not equal to 1.0, so the division by w is needed.

 

And when w=0, (x, y, z, w) represents all the vectors : a*(x ,y ,z ), a>0.   (it defines a *direction*).

 

 

Concisely, w is set to 1 for vertices, w is set to 0 for vectors (like normals). And if a transformation involves at least one perspective projection, the division by w is needed.


Edited by Tournicoti, 02 April 2013 - 04:31 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS