rotation | R Documentation |
In the
Real Projective Spaces and 3x3 Rotation Matrices
vignette,
it is shown that there is a homeomorphism between P_4^\pi
,
the space of balanced configurations of 4 or 2 points on the circle,
and \text{SO(3)}
, the space of 3x3 rotation matrices.
These functions implement the homeomorphim and its inverse.
rotationfromarcs( arcmat, tol=5.e-9 )
arcsfromrotation( rotation, tol=1.e-7 )
rotationaroundaxis( axis, theta )
arcmat |
a |
tol |
In |
rotation |
a 3x3 rotation matrix. The numeric 3x3 matrix property is verified, but, in the interest of speed, orthogonality and orientation-preservation is not verified. |
axis |
a non-zero 3-vector defining an oriented axis in |
theta |
an angle in radians. The computed rotation matrix rotates by this angle. |
As currently implemented, a 2-point configuration in P_2^\pi
,
whose points must be antipodal, maps to a rotation around the x-axis.
The configuration of the 2 points (0,\pm 1)
maps to the 3x3 identity matrix.
See the
Real Projective Spaces and 3x3 Rotation Matrices
vignette,
for an animation of this.
rotationfromarcs()
maps from P_4^\pi
to \text{SO(3)}
;
it returns a 3x3 rotation matrix.
arcsfromrotation()
maps from \text{SO(3)}
to P_4^\pi
;
the returned set of arcs (either 1 or 2 of them) is only defined up to complementation.
Since all we want is the endpoints, the ambiguity does not matter.
The total length of the arcs is \pi
.
rotationaroundaxis()
returns a 3x3 rotation matrix
which rotates theta
radians around the given axis
.
In case of error, all these functions return NULL
.
boundaryfromarcs()
,
spherefromboundary()
,
boundaryfromsphere()
,
arcsfromboundary()
,
complementaryarcs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.