<p>Euler rotations work around the axes. This is represented in 3 angles (rot_x, rot_y, rot_z). The order of the rotation needs to be determined as the order affects the result.</p>

<p>For example, if we have a point (1, 0, 0) and we rotate 90 degrees around the Y and then 90 degrees around the Z, then the result will be</p>

<pre><code>v1 = (1,0,0)
v2 = rotate_y(v1, 90) # v2 = (0,0,1)
v3 = rotate_z(c2, 90) # v3 = (0,0,1)
</code></pre>

<p>When doing the other order first Z and then Y, the result is different:</p>

<pre><code>v1 = (1,0,0)
v2 = rotate_z(v1, 90) # v2 = (0,1,0)
v3 = rotate_y(c2, 90) # v3 = (0,1,0)
</code></pre>

<p>In computer graphics systems, quaternion rotations are often used, which allows rotation around any axis. This then solves many of the problems with Euler systems.</p>

CC BY-SA 4.0
2018-02-06T14:39:09.160Z
2018-07-12T13:44:06.660Z
2018-07-12T13:44:06.660Z
J. Bakker
<p>Why is there necessarily a hierarchy in Euler rotations?</p>

<p>For example I need to decide that I want</p>

<pre><code>x to affect y and z
z to affect y
y to affect nothing.
</code></pre>

<p>What if I wanted to have something like:</p>

<pre><code>x to affect y and z
z to affect x and y
y to affect nothing
</code></pre>

<p>(x, y and z refer to rotations about x, y and z)</p>

<p>I understand for a physical gimbal there is a restriction, but that need not be necessary for a computer graphics system, right?</p>

<computational-geometry><geometry>
Heirarchy in Euler rotations
Mahathi Vempati
# Heirarchy in Euler rotations

(Asked by: username_0 on 2018-02-06)

Why is there necessarily a hierarchy in Euler rotations?

For example I need to decide that I want

```
x to affect y and z
z to affect y
y to affect nothing.

```

What if I wanted to have something like:

```
x to affect y and z
z to affect x and y
y to affect nothing

```

(x, y and z refer to rotations about x, y and z)

I understand for a physical gimbal there is a restriction, but that need not be necessary for a computer graphics system, right?

**Tags:** computational-geometry, geometry


---

## 1 answers

### Answer by username_1 on 2018-02-06. Score: 1

Euler rotations work around the axes. This is represented in 3 angles (rot\_x, rot\_y, rot\_z). The order of the rotation needs to be determined as the order affects the result.

For example, if we have a point (1, 0, 0) and we rotate 90 degrees around the Y and then 90 degrees around the Z, then the result will be

```
v1 = (1,0,0)
v2 = rotate_y(v1, 90) # v2 = (0,0,1)
v3 = rotate_z(c2, 90) # v3 = (0,0,1)

```

When doing the other order first Z and then Y, the result is different:

```
v1 = (1,0,0)
v2 = rotate_z(v1, 90) # v2 = (0,1,0)
v3 = rotate_y(c2, 90) # v3 = (0,1,0)

```

In computer graphics systems, quaternion rotations are often used, which allows rotation around any axis. This then solves many of the problems with Euler systems.


---

