Jump to content
  • Advertisement
Sign in to follow this  
creavol

OpenGL why did M$ choose left-hand coordinate?

This topic is 4829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In mathematics and opengl, coordinates are of right-hand. But, I wonder why did M$ choose left-hand coordinate, so give confusion to programmers? [Edited by - creavol on August 1, 2005 7:00:49 AM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Wait...what? If they're all left-hand, what's the problem?

Share this post


Link to post
Share on other sites
In mathematics, coordinates are either right- or left-handed, and must be specified for completeness. Consequently, Microsoft, or any other entity, can pick whichever coordinate system they prefer.

I was taught both left- and right-handed coordinate systems in secondary school, including corresponding variants to the corkscrew and "right-hand rule." Consequently, I say your education is deficient.

Have a nice day.

Share this post


Link to post
Share on other sites
Quote:
Original post by creavol
In mathematics and opengl, coordinates are of left-hand.


Are you sure? I'm pretty sure mathematicians use right-handed systems. Don't quote me on that though.

Quote:

But, I wonder why did M$ choose left-hand coordinate, so give confusion to programmers?

I don't know the reasons behind it, but IIRC D3DX provides functions for converting between right and left-handedness. But don't quote me on that either. [smile]

Share this post


Link to post
Share on other sites
I'm not the greatest "pure" mathemagician, but my understanding of left vs right is that it's simply 2 different ways of doing the same thing. At least, for the reasonably simple stuff - maybe it makes differences at the theoretical/complex level [grin]

Quote:
Original post by nilkn
IIRC D3DX provides functions for converting between right and left-handedness. But don't quote me on that either. [smile]

Too late, I just quoted you on it [smile] - But you are right, D3DX offers "LH" (Left Hand) and "RH" (Right Hand) flavours of the projection and view matrix functions:


D3DXMatrixLookAtLH or D3DXMatrixLookAtRH
D3DXMatrixOrthoLH or D3DXMatrixOrthoRH
D3DXMatrixOrthoOffCenterLH or D3DXMatrixOrthoOffCenterRH
D3DXMatrixPerspectiveFovLH or D3DXMatrixPerspectiveFovRH
D3DXMatrixPerspectiveLH or D3DXMatrixPerspectiveRH
D3DXMatrixPerspectiveOffCenterLH or D3DXMatrixPerspectiveOffCenterRH

(From this page)

hth
Jack

Share this post


Link to post
Share on other sites
I seem to recall one system was (historically) used in physics while the other was used in mathematics...or something like that.

As to why microsoft did it, here's a couple of possible good reasons:
1) RenderMan uses a left-hand coordinate system
2) Left hand systems are often used for cameras and camera placement (the uvn camera system is left handed)

Share this post


Link to post
Share on other sites


As you can see, the difference between left-handed and right-handed is pretty minimal. To convert a vector between the two, just reverse the sign of the Z axis. You must also reverse the triangle winding order if you are dealing with a set of polygons.

It's not a big deal, really.

Share this post


Link to post
Share on other sites
You can use D3DX in order to transform your view to righthand. ITs really easy.

My engine uses DX and uses right handed coords so it is friendly to 3DStudioMax so programmers and artists we can all talk in the same coords.

Luck!
Guimo

Share this post


Link to post
Share on other sites
You can definately use either system in mathematics, we switch between them all the time depending on who is lecturing. However, I seem to remember one of my old mechanics tutors telling me that the cross product was only properly rigoursly defined in a right handed coordinate system. Although it makes no difference when you are programming really :)

Share this post


Link to post
Share on other sites
Quote:
Original post by weasalmongler
You can definately use either system in mathematics, we switch between them all the time depending on who is lecturing. However, I seem to remember one of my old mechanics tutors telling me that the cross product was only properly rigoursly defined in a right handed coordinate system. Although it makes no difference when you are programming really :)

I don't see that being possible. Since it's possible to map all elements of the LHCS to corresponding elements of the RHCS, if the dot product was undefined in LHCS, then it would be undefined in RHCS.

Share this post


Link to post
Share on other sites

This topic is 4829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!