Archived

This topic is now archived and is closed to further replies.

Timkin

Coordinate convention?

Recommended Posts

Hi folks, I just wanted to check what the convention is for labelling coordinates relative to the screen within the graphics community. As I understand it, typically x is the horizontal coordinate and y as the vertical coordinate. Is it the case that within the graphics community these are preserved, with the addition of z as the depth coordinate (into the screen)? Thanks, Timkin

Share this post


Link to post
Share on other sites
No, I simply want to know what the convention is for coordinate labels. For example, in a right handed coordinate system, if z is into the screen, then one could label positive x as vertical and up and positive y as horizontal and right (relative to looking at the screen), or positive x as horizontal and right and positive y as vertical and down. Alternatively, if z is out of the screen, then one could label positive x as horizontal and right and positive y as vertical and up.

... and then there are left-handed coordinate systems.

Is one of these options a standard convention, or do people just choose their own convention and describe it before going on to describe their operations (like moving things around, setting camera attributes, etc.)?

Thanks,

Timkin

Share this post


Link to post
Share on other sites
Coordinate system conventions typically depend on the programmer/engine, they''re mostly a matter of preference. You could also stick with either the OpenGL or the Direct3D one. But since coordframe conversions are easy to encode in either the world or projection matrix, they come basically for free.

Choose whatever you feel comfortable with. If your engine is supposed to work with an existing 3D modelling package, then it is usually a good idea to inherit the axis conventions from the modeller.

Share this post


Link to post
Share on other sites
If you just want to convert from the left handed system to the right handed system (or vica-versa), you can change the sign on the z component. For anything more complicated, you''d probably need a basic understanding of linear algebra.

Share this post


Link to post
Share on other sites