Coordinate Transformations

From OpenGL Wiki
Revision as of 01:30, 3 August 2012 by Ldo (talk | contribs) (coordinate conventions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A lot of conventions as to how we do things are arbitrary. For example, driving on the left side of the road is not inherently better or worse than driving on the right side. But if users of the same road don’t all agree to drive on the same side, then the result is grief.

The same is true of computer graphics. For example, coordinate systems can be right-handed or left-handed; if you imagine placing your eye at the (0, 0, 0) point and looking in turn in the direction of the positive-X, positive-Y and positive-Z axes, if your gaze describes a clockwise rotation, then the coordinate system is right-handed, while anticlockwise means it is left-handed. One way to remember which is which is to hold your thumb, index finger and middle finger out at right angles to each other, calling the thumb direction positive-X, index finger pointing at positive-Y, and middle finger at positive-Z; if you do this with your right hand, then the coordinate system is (naturally) right-handed; while your left hand defines a left-handed coordinate system.

The recommended convention (used in most 3D software) is to define your model/scene in a right-handed coordinate system.