Covering every possible result of x, y, z, rotation only once

146 Views Asked by At

[Edit]

Hi, I'm a programmer, so this question may not be easy for me to explain in a right way, I'll try anyway. Thire object mentioned later is a group of elements in a 3d space. We can assume that those elements are points. They transformation matrix is in space of one, common point, pivot. The operation mentioned later is applied to this point, so as a result positions of all of those elements change. To make things simpler, let's assume that I want to gather all of positions of those points after all possible combinations of x, y and z angles that result in a unique transformation matrix that will be applied to this pivot. I do know that some combinations, like 0, 0,0 and 180, 180, 180 (if I'm correct this is one of examples) would result in the same transformation of pivot, so I'd like to limit input values of x,y and z angles to prevent such combinations. [End of edit]

I've got a transformation of a 3D object: rotation along axis x, then y, then z of a 3d Cartesian coordinste system.

I'd like to perform an operation only once for every possible final orientation of this object. I know that if I'd just use range 0-360 deg. for every axis then I'd cover some of them more then once, as many combinations of those rotations may result in the same result.

I understand, that if that would be just a spherical coordinates system, then using the full range for one axis and half of it for the other would be the solution. But in this situation there's also a third rotation and I cannot wrap my head around that problem..

1

There are 1 best solutions below

0
On BEST ANSWER

** Not a complete answer, but a rephrasing of the question **

Let me try to help out here. I believe you're asking the following:

Let's call $S$ the set of all rotation matrices. (Mathematicians typically call this $SO(3)$, but let's keep it simple!)

You've got a product of three rotations,

$$ H(a, b, c) = R_z(c)\cdot R_y(b) \cdot R_x(a), $$ where each of $a,b,c$ can range from $0$ to $360$. So $H$ effectively defines a function that consumes three numbers, $a,b,c$, and produces an element of $S$.

You know that every element $M$ of $S$ has the form $H(a,b,c)$ for some $a,b,c$, but you worry that there might be two different $a,b,c$ triples that produce the same $M$. For instance, $$ H(0,0,0)\\ H(360,0,0) $$ are exactly the same matrix, namely, the $3 \times 3$ identity.

Let me give a name to the collection of all $a,b,c$ triples:

$$ T = [0, 360] \times [0, 360] \times [0, 360]. $$

So now $H$ is a function from $T$ to $S$, and you know that for every $M$ in $S$, theres a triple $(a,b,c)$ in $T$ with $H(a,b,c) = M$.

You'd like to find a subset of $T$ -- let's call it $U$ -- with the property that for each element $M$ of $S$, there exactly one triple in $U$ with $H(a,b,c) = M$.

In the language of mathematicians, we'd say that $$ H:T \to S $$ is known to be surjective, and we'd like a subset $U$ of $T$ such that the restriction of $H$ to the domain $U$ is bijective.

With that said, perhaps others can give you a description of such a subset $U$. One problem is that there are many possible answers --- there are lots of subsets on which the restriction is bijective, so there's no single "right" one.

THe first thing is that instead of closed intervals, you're going to need half-open ones: you can't have $a$ in the range $0 \le a \le 360$; instead you need $0 \le a < 360$.

Once you agree to that (because a 360 degree rotation is the same as a 0-degree rotation), one possible answer is (I think!)

\begin{align} 0 &\le a < 360\\ 0 &\le b < 360\\ 0 &\le c < 180 \end{align} although maybe the third one should be $$ -90 \le c < 90 $$ Roughly speaking, if you take the three unit vectors along the $x$, $y$, and $z$ axis (which I'll call a "frame"), then applying $M$ to each of these gives a new frame. The direction of the first vector of the new frame (expressed as longitude and latitude) are given by the numbers $b$ and $c$, so $b$ has to range over (almost) 360 degrees to give longitude, and $c$ has to range over (almost) 180 degrees to give latitude. The number $a$ then determines the rotation of the second and third vectors of the frame around the axis specified by the first, so it needs an (almost) 360-degree range.