Home  »  ArticlesTutorials   »   Multiple Coordinate Spaces; Theory of 3D Math for Computer Graphics – Part 3

Multiple Coordinate Spaces; Theory of 3D Math for Computer Graphics – Part 3

We continue with the third part of our series on the theory of 3D math for computer graphics with a look at the multiple coordinate spaces. Here we will focus on the world space, the object space, the camera space, and the inertial space.

If you missed the start of this series you can get started with an article about the Cartesian plane before reading the second part of the series where we discuss the 3D space.

Why Multiple Coordinate Spaces?

We do not live in a box so to speak. We all live in our unique space and do not get entangled in others’ spaces. At least most of the time. We generally live in a world where everything is positioned relative to each other. There are no absolutes as far as 3D spaces go. The only way to describe multiple items in an array of locations is to use multiple coordinate spaces.

The World Coordinate System

The world coordinate space or system implies a global scope where all other coordinate spaces reside. To give a better understanding, take an example of the world we live in.

Every location on this planet has an absolute position based on degrees North/South and East/West. These coordinates are constant and even though items in the world could either be movable or immovable, it does not affect the coordinates of the location in the world they are in at any one point in time.

Meaning; if another object occupies that particular space at a future time. It inherits the coordinates of that particular spot.

Likewise, the world coordinate system is a global space in which defines the  3D viewport. This view-port forms the basis or the parent in which all other coordinate systems reside.

This world coordinate system does not have to be infinite but can be limited to a 3D scene. For example, the world has fixed coordinates but the world resides in the solar system and we all know the earth revolves around the sun.

See also  Qt Virtual Keyboard Not Showing in Fullscreen Mode in Windows 10 Desktop?

This tells us that a certain point on the earth is not in the same place in relation to the entire solar system in January compared to July.

The importance of world space is that no other coordinate space in a certain scene can exist without the world coordinate system. depending on the scene this world space can be a little room, a cityscape, or a rural farm.

Unlike the earth where locations are usually restricted to latitude and longitude. The locations in a 3D world coordinate system include the x and z locations which can be equated to latitude and longitude.

Also, the Y location which corresponds to the altitude on the earth is also vital as a location in a 3D scene.

The Object Coordinate Space

In the 3D industry, it is well known that each object has its own unique object space. Therefore that tells us that the object space is a coordinate space associated with a particular object.

There is a concept in which the object space differs from the world space above in that an individual object owns its own orientation. Take for instance the world space in the real world example.

We speak of locations or directions in relation to North, East, South, and West.

In object space, we cannot guarantee where the object is facing and so when we describe a change in location when referring to objects we use the terms forward, right, backward, and left to define the orientation.

The other interesting thing is that “Move forward” in object terms could mean the object moving North or South or East or West and so on depending on the orientation at the time.

See also  Four Different Ways to Center Text in HTML

The situation gets more complication when we ask an object to move up or down.

The situation gets more complicated because we have only looked at a location. An object can also rotate based on three orientations. It can rotate on either the X, Y, or Z axes.

It is also worthwhile to note that the object space is also referred to as modeling space.

The Camera Coordinate Space

The camera coordinate space is the space that is associated with the observer. It is a space that borrows some characteristics from the object space as well as its own.

A camera is a special object that is capable of “looking” in several directions. These directions can be defined as looking right (+x) or looking left (-x). Looking forward (+z/-Z) depending on whether you are using the left-handed or right-handed cartesian orientations.

Looking up would usually be up in relation to itself. So, in general, up could be down, if the camera is upside down. The camera could also be zooming in or out, facing up (+y) or down (-y).

There is no limit to the orientation of the camera. It gets more interesting when you have multiple cameras in a scene. This could be where the camera space coordinates of each camera would end up being unique.

The cameras, in this case, would point to different areas in the scene or they could point to the same object from different areas.

The Inertial Coordinate Space

The inertial coordinate space the space in the multiple coordinate spaces the bridges the disparities between the world space and object coordinate spaces.

In the inertial coordinate space, the axes are parallel with the corresponding axes of the world space. In addition to that. The origin does not match the origin of the world space but its origin is the same as the origin of the object space.

See also  Solving the "Preparing the epic games launcher" Hanging Bug

The relationship of the inertial space with the object and world spaces can be described more easily like so:

As an object, if I command you to move forward. You would naturally move forward in the direction in which you are facing. To tie in the world space with the object space, I would need to specify that irrespective of the direction the object is facing, I can command you to move a certain distance North.

You could choose not to rotate but to simply transform yourself North or you could rotate to face North then move forward. The inertial space, therefore, is the reference at which an object transforms within the world coordination space.

To Wrap Up…

Now that we’ve taken a brief look at the multiple coordinate spaces we shall wrap up this section in the next part in this series on the theory of 3D math for computer graphics where we will have a brief discussion on nested coordinate spaces, transforming coordinate spaces and specifying coordinate spaces. Thereafter we will take a look at vectors

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Share it!

Available under:
Articles, Tutorials