Left-Handed vs Right-Handed
Personally, I find the Right-Handed coordinate system much
more intuitive to work with. This may be due to the fact that
I''m accustomed to 2D stuff first, where you only have (X,Y).
So, naturally, I think of ''Z'' as the "height" or "elevation",
with positive ''Z'' meaning above and negative ''Z'' meaning
below. This describes exactly the Right-Handed system.
Also, in Mathematics, it''s the Right-Handed system that
gets used most. At least in all the textbooks that I
have ever studied.
I''ve seen code dealing with Left-Handed system, where they
use (X,Z) for positiion and ''Y'' as the "height". Hmm...
I don''t like that. Very awkward.
So, what''s your reason for choosing one over the other?
~~~~
Kami no Itte ga ore ni zettai naru!
quote:I've seen code dealing with Left-Handed system, where they
use (X,Z) for positiion and 'Y' as the "height". Hmm...
I don't like that. Very awkward.
blah? if you are very nice you can have a left handed system where Z is used as "height". all that actually matters is how you place your camera. I think :And if you think of X as the horizonal axis, Y as the vertical axis and Z as a depth axis the code you have described isn't very awkward.
May The Gzoo Be With You!
~Lord Gzoo
[edited by - lord gzoo on July 15, 2002 12:34:33 AM]
quote:Original post by tangentz
Personally, I find the Right-Handed coordinate system much
more intuitive to work with. This may be due to the fact that
I''m accustomed to 2D stuff first, where you only have (X,Y).
That''s actually exactly why I like the left-handed system. I prefer to think of it as looking "into" the screen. So that my x,y coordinates are still relative the screen. Where the Z is my depth. That and the term z-buffer refers to the depth buffer. How can you think of a depth buffer that uses a vertical axis? ;P
Always remember, you''''re unique. Just like everyone else.
This is the way I look at it. Pretend you are just looking out towards a field. Someone puts a piece of paper in front of you. X is left to right, Y is up and down on it. Z would be forward and back. I prever Z getting bigger as it goes away from the origin because (as I see it) as something goes away from you, it''s distance increases. Thats why I prefer the left-handed coordinate system.
BTW, in a right handed coordinate system y still points up and down. Are you saying that Z does tangentz?
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
BTW, in a right handed coordinate system y still points up and down. Are you saying that Z does tangentz?
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Perhaps it''s clearer to distinguish between World and
Camera geometry.
I see the XY plane as "flat" on the ground and Z denotes the
height. No problem, this is right-handed.
Now for the camera, I see it as using XY being the screen,
(0,0) lower-left, and Z as the "depth". But, with positive
Z being "out" of the screen, while negative Z being "into"
the screen.
Another way to visualize this is that my eyes are always
positioned "above" the screen (positive Z) and every object
in the world is "below" the screen (negative Z).
Again, the camera is right-handed.
~~~~
Kami no Itte ga ore ni zettai naru!
Camera geometry.
I see the XY plane as "flat" on the ground and Z denotes the
height. No problem, this is right-handed.
Now for the camera, I see it as using XY being the screen,
(0,0) lower-left, and Z as the "depth". But, with positive
Z being "out" of the screen, while negative Z being "into"
the screen.
Another way to visualize this is that my eyes are always
positioned "above" the screen (positive Z) and every object
in the world is "below" the screen (negative Z).
Again, the camera is right-handed.
~~~~
Kami no Itte ga ore ni zettai naru!
Thats an excellent point tangentz. I''ve always thought of the screen (physically, like, my monitor) looking into my game world, as an extension of myself. If I reverse that thinking, and pretend the screen is looking at me, then it makes sense to make the z negative.
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
For programmers working with graphics, the XY plane as monitor and Z into screen (LHS) into screen is more intuitive.
For pure mathematicians, Z point upwards (RHS) is the inituitive.
For mathematicians who are also programmers, they are happy with Z pointing outwards (OpenGL RHS).
It''s all a choice of preference and giving me one hell of headache when converting from one coordinate to another.
For pure mathematicians, Z point upwards (RHS) is the inituitive.
For mathematicians who are also programmers, they are happy with Z pointing outwards (OpenGL RHS).
It''s all a choice of preference and giving me one hell of headache when converting from one coordinate to another.
Besides, you can easily switch between left and right handed coordinate systems in any api (DX, GL etc) simply by putting in a suitable projection matrix, or just multiplying by an appropriate matrix (i.e. identity with 3,3 being -1 instead) will switch from a "GL" system (RHS) to a "DX" system (LHS).
Its all still confusing tho sometimes.
Dæmin
(Dominik Grabiec)
dominik.grabiec@student.adelaide.edu.au
Its all still confusing tho sometimes.
Dæmin
(Dominik Grabiec)
dominik.grabiec@student.adelaide.edu.au
I don't think people here understand the difference between the right handed and the left handed systems (or is it me??).
In BOTH systems X is left right, Y is up down. However, in left handed system Z increases as you go further inside the monitor and decreases as you get closer to yourself. In right handed system it's exactly the opposite, X decreases as you go further inside the monitor and increases as you get closer to yourself.
Left and right handed systems have absolutely nothing to do with whether you lay your world out on xz plane or on xy plane.
[edited by - kill on July 17, 2002 4:32:15 PM]
In BOTH systems X is left right, Y is up down. However, in left handed system Z increases as you go further inside the monitor and decreases as you get closer to yourself. In right handed system it's exactly the opposite, X decreases as you go further inside the monitor and increases as you get closer to yourself.
Left and right handed systems have absolutely nothing to do with whether you lay your world out on xz plane or on xy plane.
[edited by - kill on July 17, 2002 4:32:15 PM]
quote:Original post by kill
I don''t think people here understand the difference between the right handed and the left handed systems (or is it me??).
In BOTH systems X is left right, Y is up down. However, in left handed system Z increases as you go further inside the monitor and decreases as you get closer to yourself. In right handed system it''s exactly the opposite, X decreases as you go further inside the monitor and increases as you get closer to yourself.
Left and right handed systems have absolutely nothing to do with whether you lay your world out on xz plane or on xy plane.
[edited by - kill on July 17, 2002 4:32:15 PM]
You are talking about Direct3D LHS and Opengl RHS only. There are 6 ways to represent a coordinate hand system. Look at 3dmax, the up axis is Z.
When you have to mix objects from different coordinate systems in one scene, then the conversion becomes a pain.
The worse thing is when skeletal bones come into the picture. Some programs like to use Y axis as bone direction, some use X, some use Z. Getting them to work together is a real pain.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement