2
$\begingroup$

I have a real-valued function $f(\alpha, \beta, \gamma)$ which takes Euler angles $\alpha, \beta, \gamma$ as input, that I would like to average over the uniform distribution on orientations of 3-space. We use the convention that $\alpha, \beta, \gamma$ are applied about the fixed global $x, y, z$ axes respectively, in the order $\gamma, \beta, \alpha$.

This means I'll want to compute an integral of the form $\int_A \int_B \int_C f(\alpha, \beta, \gamma) V(\alpha, \beta, \gamma)d\gamma d\beta d\alpha$, where $A, B, C \subset \mathbb{R}$ are angular ranges and $V(\alpha, \beta, \gamma) d\gamma d\beta d\alpha$ is the volume element of the normalized Haar measure on $\mathop{SO}(3)$ using this parametrization.

What are the expressions for $A, B, C$, and $V$? Is there a reference for this?

I know that it is possible to convert to quaternion representation (among others) and compute the integral that way, but I would like an expression for $V$ in terms of $\alpha, \beta, \gamma$.

$\endgroup$
3
+50
$\begingroup$

It might be worth noting that Euler angles are often poorly suited to this type of problem, particularly in numerical contexts: some computations become numerically unstable when close to gimbal lock.

It's probably easiest to compute this measure by transforming into quaternions and computing the transformation of the volume element, since in the quaternionic setting it's just the standard volume element on the unit 3-sphere.

Per Wikipedia, the conversion from a "standard" extrinsic $z$-$x$-$z$ Euler angles to a unit quaternion has the form $$ \mathbf{q}(\alpha,\beta,\gamma)=\begin{matrix} \cos\left(\frac{\alpha+\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) \\ +\cos\left(\frac{\alpha-\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right)\mathbf{i} \\ +\sin\left(\frac{\alpha-\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right)\mathbf{j} \\ +\sin\left(\frac{\alpha+\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right)\mathbf{k} \end{matrix} $$ (This is presumably computed by decomposing into rotations about coordinate axes and composing as quaternions.) Computing the Jacobian, $$ D\mathbf{q}(\alpha,\beta,\gamma)=\frac{1}{2}\begin{bmatrix} -\sin\left(\frac{\alpha+\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) & -\cos\left(\frac{\alpha+\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right) & -\sin\left(\frac{\alpha+\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) \\ -\sin\left(\frac{\alpha-\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right) & \cos\left(\frac{\alpha-\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) & \sin\left(\frac{\alpha-\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right) \\ \cos\left(\frac{\alpha-\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right) & \sin\left(\frac{\alpha-\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) & -\cos\left(\frac{\alpha-\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right) \\ \cos\left(\frac{\alpha+\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) & -\sin\left(\frac{\alpha+\gamma}{2}\right)\sin\left(\frac{\beta}{2}\right) & \cos\left(\frac{\alpha+\gamma}{2}\right)\cos\left(\frac{\beta}{2}\right) \end{bmatrix} $$ We can't take the determinant directly on account of the superfluous extra dimension. Because we are looking at the induced volume measure on $S_3\subset\mathbb{R}^4$, we can augment this matrix with a unit radial vector (namely $\mathbf{q}$) to obtain the volume scaling factor. $$ dV=\left|\det\begin{bmatrix}\mathbb{q}(\alpha,\beta,\gamma) & D\mathbb{q}(\alpha,\beta,\gamma)\end{bmatrix}\right|d\alpha\ d\beta\ d\gamma=\frac{1}{8}\sin(\beta)d\alpha\ d\beta\ d\gamma,\ \ \ \text{(extrinsic $z$-$x$-$z$)} $$ This gives (up to a choice of multiplicative constant) the Haar measure.

As for the ranges, one standard range of values (for any Euler/Tait-Bryan convention) is $\alpha\in(-\pi,\pi)$, $\beta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$, $\gamma\in(-\pi,\pi)$, with $\alpha$ and $\gamma$ equivalent modulo $2\pi$. It can be shown that, up to sets of measure zero, this covers $SO(3)$ exactly once. One sanity check for the computed Haar measure is that the upper hemisphere of $S_3$ has volume $\pi^2$.

The approach above works for any 3 variable parameterization of $SO(3)$. In particular the other Euler angle conventions, (intrinsic $x$-$z'$-$x''$, etc.), as well as the Tait-Byan angles (intrinsic $z$-$y'$-$x''$, extrinsic $y$-$z$-$x$, etc.). It seems to be the case that all Euler angle conventions have the volume element $$ dV=\frac{1}{8}\sin(\beta)d\alpha\ d\beta\ d\gamma,\ \ \ \text{(Euler)} $$ and all Tait-Bryan angles (including extrinsic $z$-$y$-$x$) have the volume element $$ dV=\frac{1}{8}\cos(\beta)d\alpha\ d\beta\ d\gamma,\ \ \ \text{(Tait-Bryan)} $$ This can be checked for a given convention by repeating the above computation (using Mathematica or any other symbolic computation tool).

Based on the simplicity of the result, there may be a less computational, more group-theoretic way to arrive at these formulae starting with EA/TBA as compositions of coordinate axis rotations, though it's not yet obvious to me what it would be.

$\endgroup$
2
  • $\begingroup$ Thanks, but in my application I'm using a different Euler angle convention. It's described in the question. I believe it's "extrinsic zyx" according to the Wikipedia nomenclature. $\endgroup$ – Andrey Mishchenko Aug 26 '19 at 4:13
  • $\begingroup$ Exactly the same approach works for that convention, starting from the appropriate conversion formula. The algebra is just as tedious for all of them, but there seems to be only two forms, one for Euler (zxz etc.) and one for Tait-Bryan (zyx etc.). $\endgroup$ – Kajelad Aug 26 '19 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.