...
Unfortunately
...
the
...
documentation
...
for
...
rotations
...
in
...
Wired4
...
is
...
a
...
bit
...
lacking.
...
Rotations
...
in
...
general
...
can
...
be
...
decomposed
...
into
...
three
...
consecutive
...
rotations
...
about
...
the
...
primary
...
axes.
...
R_x
...
=
...
R1R2R3
...
In
...
Wired,
...
the
...
choice
...
was
...
made
...
to
...
rotate
...
by
...
an
...
angle
...
omega
...
about
...
the
...
z
...
axis,
...
followed
...
by
...
a
...
rotation
...
by
...
theta
...
about
...
the
...
new
...
x
...
axis,
...
followed
...
by
...
a
...
rotation
...
about
...
phi
...
around
...
the
...
y
...
axis.
...
The
...
ultimate
...
reference,
...
as
...
usual,
...
is
...
the
...
code,
...
in
...
this
...
case
...
for
...
In Wired4, the choice of rotation is
R_omega =
cos omega | -sin omega | 0 |
sin omega | cos omega | 0 |
0 | 0 | 1 |
R_theta =
1 | 0 | 0 |
0 | cos theta | -sin theta |
0 | sin theta | cos theta |
R_phi =
cos phi | 0 | sin phi |
0 | 1 | 0 |
-sin phi | 0 | cos phi |
We can multiply these entities in the right order to get the combined rotation around all three axes.
The code appears to perform the rotations in the order presented here, so we compute R_phi R_theta R_omega and get
sin(omega) sin(phi) sin(theta) + cos(omega)cos(phi) | cos(omega)sin(phi)sin(theta) - sin(omega)cos(phi) | sin(phi)cos(theta) |
sin(omega) cos(theta) | cos(omega)cos(theta) | -sin(theta) |
sin(omega) cos(phi)sin(theta) - cos(omega)sin(phi) | cos(omega)cos(phi)sin(theta)+sin(omega)sin(phi) | cos(phi)cos(theta) |