PDA

View Full Version : *world coordinate* vs *object coordinate*

Ehsan Kamrani
05-17-2005, 11:11 PM
Although i have no problem with the OpenGL programs, but can you explain the differences of the *world coordinate* and *object coordinate* terms?
-Ehsan-

jide
05-18-2005, 12:41 AM
When we say world coordinate, we mean the origin and the default axis with it: O(i,j,k).
When we say object coordinate, we mean a new origin located at an object's position (P) and with axis regarding the object's orientation: P(i',j',k').

i and i', j and j' and k and k' are not forcelly colinear because of some possible rotations from O to P. But both O(i,j,k) and P(i',j',k') shoud be direct orthonormal basis.

hope that helps.

Relic
05-18-2005, 03:03 AM
See OpenGL 2.0 spec chapter 2.11:
"Figure 2.6 diagrams the sequence of transformations that are applied to vertices.
The vertex coordinates that are presented to the GL are termed object coordinates.
The model-view matrix is applied to these coordinates to yield eye coordinates.
Then another matrix, called the projection matrix, is applied to eye
coordinates to yield clip coordinates. A perspective division is carried out on clip
coordinates to yield normalized device coordinates. A final viewport transformation
is applied to convert these coordinates into window coordinates."

The term world coordinates is not used there. You could think of world coordinates as the coordinates of all your geometry before the final positioning of the viewer, but OpenGL doesn't do this intermediate step.
Just think of eye coordintes as world coordinates. They are in the same system.

Ehsan Kamrani
05-18-2005, 07:08 AM
So we can have many object coordinates, since we can use from many glPushMatrix()/glPopMatrix() pairs.But we have only one coordinate system.
...And i understand. those steps are the important steps in the OpenGL pipeline: transformation, clipping, projection and rasterization.
And i know the meaning of the eye coordinates.It's the defenition that programmers use to understand the meaning of the camera. camera in just some mathematics.There's no, as an example, a camera matrix:)
Thanks a bunch
-Ehsan-