# Name For This Coordinate System?

This topic is 2894 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

From what I've read, it seems that OpenGL uses a left-handed cartesian coordinate system, and Direct3D uses a right-handed cartesian coordinate system (or the other way around?). My game, however, uses neither of these. The coordinate system I'm using is like the right-handed system, except with the Y and Z axes swapped. Using this system, a camera pointing straight down sees the X and Y axes, while Z is used for altitude. Is there a name for this system? I plan to use preprocessor switches to choose between this and the typical right-handed system, but I don't know what to call this modified system in these macros. Any help is appreciated.

##### Share on other sites

From what I've read, it seems that OpenGL uses a left-handed cartesian coordinate system, and Direct3D uses a right-handed cartesian coordinate system.

That's backwards -- OpenGL was designed to use a right-handed coordinate system, and Direct3D left. (This is less and less an issue, because of the flexibility provided by the programmable pipeline, but it's still the convention.)
My game, however, uses neither of these.[/quote]
Incorrect -- any 3d cartesian coordinate system is either left- or right-handed.
The coordinate system I'm using is like the right-handed system, except with the Y and Z axes swapped.[/quote]
That makes it a left-handed system.

I think you may be confused about "left-handed" and "right-handed". These terms don't describe the orientation of the axes in space, or their orientation relative to the viewer. They describe axes' orientation relative to each other. If a vector rotating from the positive x axis towards the positive y axis appears to turn clockwise when viewed in the direction of the positive Z axis (regardless of whether that's where your camera is pointing), the space is right-handed. If the vector turns counter-clockwise, the space is left-handed.

What you may be looking for is "Y-up" or "Z-up", terms which are independent of handedness. It sounds like you have a left-handed Z-up system, though it's difficult to be sure about the handedness from your description.

##### Share on other sites

That's backwards -- OpenGL was designed to use a right-handed coordinate system, and Direct3D left. (This is less and less an issue, because of the flexibility provided by the programmable pipeline, but it's still the convention.)

Incorrect -- any 3d cartesian coordinate system is either left- or right-handed.

That makes it a left-handed system.

I think you may be confused about "left-handed" and "right-handed". These terms don't describe the orientation of the axes in space, or their orientation relative to the viewer. They describe axes' orientation relative to each other. If a vector rotating from the positive x axis towards the positive y axis appears to turn clockwise when viewed in the direction of the positive Z axis (regardless of whether that's where your camera is pointing), the space is right-handed. If the vector turns counter-clockwise, the space is left-handed.

What you may be looking for is "Y-up" or "Z-up", terms which are independent of handedness. It sounds like you have a left-handed Z-up system, though it's difficult to be sure about the handedness from your description.

Thanks for the reply! It seems that the article that I read wasn't incredibly clear on this.

##### Share on other sites
The OpenGL coordinate system is a right-handed coordinate system, but it isn't the unique possible right-handed coordinate system. Indeed, all the coordinate systems which can be obtained from the OpenGL one, are also right-handed. Similarly, all the coordinate system which can be obtained from the DirectX one are left-handed coordinate systems. All the coordinate systems are either left-handed or right-handed and this property is called orientation (and it is generalizable to all dimensions). Your coordinate system is left-handed (if I have understood it correctly).

##### Share on other sites

From what I've read, it seems that OpenGL uses a left-handed cartesian coordinate system, and Direct3D uses a right-handed cartesian coordinate system. My game, however, uses neither of these. The coordinate system I'm using is like the right-handed system, except with the Y and Z axes swapped. Using this system, a camera pointing straight down sees the X and Y axes, while Z is used for altitude. Is there a name for this system? I plan to use preprocessor switches to choose between this and the typical right-handed system, but I don't know what to call this modified system in these macros. Any help is appreciated.

By default (they can be changed), OGL uses a right-hand system and DX uses a left-hand. However, a "right-handed system, ... with the Y and Z axes swapped" is just a left-handed system.

Assuming you're talking about 3 orthogonal axes, using your right hand, point the fingers along the +X axis. Curl the fingers until they point along the +Y axis. If your thumb points along the +Z axis - it's right-handed. If it points along the -Z axis, it's left-handed.

If that doesn't work for you, perhaps you could better describe your axes arrangement.

NINJA'd - several times

##### Share on other sites
The issue of naming the systems that my code can switch between has more to do with translation than rotation.

System A
While looking forward:
- Increasing the X coordinate moves an object right on the screen.
- Increasing the Y coordinate moves an object up on the screen.
- Increasing the Z coordinate moves an object away from the camera.

System B (Y/Z swap)
While looking down:
- Increasing the X coordinate moves an object right on the screen.
- Increasing the Y coordinate moves an object down on the screen.
- Increasing the Z coordinate moves an object toward the camera.

##### Share on other sites
Do you still have a question? If an increase in a coordinate refers to the camera position, both systems are right-handed. You've just rotated the camera about the Z axis and changed whether the camera is facing -Z or +Z.

##### Share on other sites

Do you still have a question? If an increase in a coordinate refers to the camera position, both systems are right-handed. You've just rotated the camera about the Z axis and changed whether the camera is facing -Z or +Z.

I was just confused about the meaning of LH and RH coordinates. I was trying to decide on names for the systems, but since they are both technically RH, I'll just call them "normal" and "swapped". Thanks, everyone, for the clarification!

##### Share on other sites

I was just confused about the meaning of LH and RH coordinates. I was trying to decide on names for the systems, but since they are both technically RH, I'll just call them "normal" and "swapped". Thanks, everyone, for the clarification!

Actually, in the example you gave, both systems are left-handed.

##### Share on other sites

The OpenGL coordinate system is a right-handed coordinate system, but it isn't the unique possible right-handed coordinate system. Indeed, all the coordinate systems which can be obtained from the OpenGL one, are also right-handed. Similarly, all the coordinate system which can be obtained from the DirectX one are left-handed coordinate systems.

As other posters have alluded to, that's not actually true; it's long been the case that both OpenGL and Direct3D can be set up to use either a left- or a right-handed coordinate system (whatever the user prefers).

1. 1
2. 2
3. 3
Rutin
12
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633695
• Total Posts
3013384
×