2
\$\begingroup\$

When dealing with affine transformations, why do we need to change from one frame to another? What are some reasons. What are the pros and cons of doing this and the limitations if this was not possible.(Change of Coordinate Transformations)

enter image description here

\$\endgroup\$
6
  • 1
    \$\begingroup\$ Can you give an example​ of the kind of coordinate system change you're talking about? We use a lot of coordinate systems in games — local, parent, world, tile, view, projected, clip, normalized device coordinates, screen pixel coordinates, texture coordinates, barycentric, tangent space, bone or blend space... — so covering the gamut in one answer would be a big undertaking. I imagine you've encountered coordinate transforms in the context of a particular application or feature in your game, so can you tell us more about this use case you'd like explained? \$\endgroup\$
    – DMGregory
    May 25, 2017 at 12:10
  • \$\begingroup\$ Cartesian to Cartesian \$\endgroup\$
    – Terry
    May 25, 2017 at 12:14
  • \$\begingroup\$ Most of the coordinate systems I listed are Cartesian (I neglected to even touch on spherical and polar coordinates or the various hex grid coordinate systems, oops!), so that doesn't narrow things down much. ;) It might help if you describe the specific game feature you're trying to implement, and we can tell you how coordinate transforms can help with that type of work. A fully general answer is liable to end up being quite vague and not very helpful or applicable, which is why I'm hunting for some more specific game context. Without this it looks a lot like a question for a math site. \$\endgroup\$
    – DMGregory
    May 25, 2017 at 12:26
  • \$\begingroup\$ Why do I have to change the frame of reference? If the object stays rigid but just translate to a different location but with different basis vectors. What is the reason needed to have different basis vectors. As in the picture, frame A is in different orientation than B. In contrast to just rotating, scaling and translating. \$\endgroup\$
    – Terry
    May 25, 2017 at 12:38
  • \$\begingroup\$ Nevermind, I guess I can say Frames of reference are particularly important when describing an object's displacement \$\endgroup\$
    – Terry
    May 25, 2017 at 12:48

2 Answers 2

1
\$\begingroup\$

Here are 2 important ones. Let's assume we model a galaxy.

  • We have a moon that rotates around its own axis and orbits a planet, which orbits a sun, which orbits the center of the galaxy. Here we use a coordinate system that has the moon as the origin, one that has the planet as the origin, one that has the sun as the origin, and one that has the galaxy as the origin.

  • In the same example as above, consider floating point precision limits. Once we reach the outer edges of the galaxy, the resolution of a single precision floating point value will map all the 5000 vertices of the moon to a few dozen points, due to rounding errors on single precision floating point values, giving it a rather unfortunate shape.

\$\endgroup\$
1
\$\begingroup\$

The reason we change coordinate systems, is to simplify relationships between objects in a simulation or game.

For example: In computer graphics, we are only interested in where objects are, relative to the camera, or eye. Therefore, we need a coordinate system which describes the space according to the eye. We call this, a view transform.

This is all fine and well in Cartesian space, but sometimes we need to work in non Cartesian space, such as texture space (used for normal mapping), and being able to simplify moving from object space to texture space, or from world space to texture space, makes it a lot easier.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .