We use a coordinate system to describe the position and orientation of objects in space. Three axes correspond to directions x, y, and z, and a unit distance is defined on the axes. When we say that some point p = (2, 3, -4), we mean that p lies 2 units along the x-axis, 3 along the y-axis, and -4 along the z-axis. We use coordinate systems to position and objects comprising multiple points and faces such as the triangles we’ve already drawn.
The top-level coordinate system is called world coordinate space or, more simply, world space. We picture it by red, green, and blue lines extending in the positive x, y, and z directions respectively. We’ll adopt the convention that, as drawn, each of these axes has length 10. For example, the x-axis is depicted by a thin red line segment that extends from the origin (0,0,0) to the point (10, 0, 0).
We often think of the positive x-axis extending to the right, the y-axis as extending vertically, and the z-axis as extending out of the screen toward the viewer. The xz-plane forms a ‘floor’ and the y-axis determines height above or below this floor. For most of our programs, the viewer initially lies at a point on the positive z-axis facing the origin. From there, you can navigate through the scene by orbiting around the origin, by zooming in and out (changing the orbit radius), and by panning (changing the center of orbit). To navigate, you move your mouse and and press mouse buttons, or press arrow keys, or gesture on a track pad or on the screen itself, depending on the device you’re using.
World space is the top-level coordinate system. We usually define new coordinate systems known as local spaces relative to world space. Local spaces are useful for designing new objects and combining them into more complex objects and placing them into scenes. What results from the design process is a hierarchy of spaces called a scene graph. Every local space is ultimately defined, directly or indirectly, in terms of world space, which lies at the root of the scene graph hierarchy. We’ll look into scene graphs later. But for now, we’ll build our objects directly in world space which we depict by thin red, green, and blue axes.