# Orientation of the 3D space

**URL:** <https://discourse.processing.org/t/orientation-of-the-3d-space/4200>\
**Category:** Processing\
**Created:** [October 6, 2018, 8:16pm UTC](https://discourse.processing.org/t/orientation-of-the-3d-space/4200 "2018-10-06T20:16:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 6, 2018, 8:16pm UTC](https://discourse.processing.org/t/orientation-of-the-3d-space/4200/1 "2018-10-06T20:16:16Z")

</div>

Hi everyone,

I played around with 3D shapes and I noticed that the way the 3D space is oriented is not the one I would have expected.

The picture below represent:

- the x axis in red
- the y axis in green
- the z axis in blue
- the dots indicates the positive sides

![3DOrientation](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/76f9c658c0216fc622cd37b9eeb5f8e3639e0771.png)

As you can see, the world is using the “left hand” convention. I was expected the x axis to point toward the right side to fit the “right hand” convention. Math and Physic both used the latest.

Is there a particular reason why it was setup like this?

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [October 6, 2018, 8:25pm UTC](https://discourse.processing.org/t/orientation-of-the-3d-space/4200/2 "2018-10-06T20:25:28Z")

</div>

For a 2D sketch, which most people are usually going to start with, the system is orientated so that the top left is (0,0), X+ is to the right, and Y+ is down - similar to how people write on paper. I believe the lore is that this was an attempt to make it easier for new programmers to understand.

_Adding the third dimension, Z+ is in, so things with large Z seen father away, making Z the distance from the viewer. Again, this is easy for people to understand._  
EDIT: Ignore this bit.

What results is a left hand system. Expert users are not alarmed, however, as a simple call to scale(-1,1,1) can resolve this for them.

… At least that’s what I was told…

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 6, 2018, 8:33pm UTC](https://discourse.processing.org/t/orientation-of-the-3d-space/4200/3 "2018-10-06T20:33:02Z")

</div>

That was also my thought at the beginning but having a left hand system make the Z direction going from the screen to the viewer (keeping x to the right and y to the bottom) making it again counter intuitive IMHO…

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [October 13, 2018, 11:35pm UTC](https://discourse.processing.org/t/orientation-of-the-3d-space/4200/4 "2018-10-13T23:35:25Z")

</div>

No strong opinion on the Z-axis, but the 2D and 3D systems both have x,y axis that are logically consistent with each other – so you get similar behavior if you change from P2D to P3D rendering.

The decision to use piece-of-paper orientation was originally in the context of 2D, I believe – for some in 2D it can also be surprising that the origin is in the upper left, not the lower left. Thankfully 2D and 3D are consistent with each other. I think that is the most important thing of all.
