Package Scientific :: Package Geometry :: Module Transformation :: Class Rotation
[frames] | no frames]

Class Rotation

     Transformation --+    
                      |    
RigidBodyTransformation --+
                          |
                         Rotation

Rotational transformation

Instance Methods
Scientific.Geometry.Vector
__call__(self, other)
Returns: the transformed vector
 
__init__(self, *args)
There are two calling patterns:
 
__mul__(self, other)
 
asLinearTransformation(self)
Scientific.Geometry.Quaternion.Quaternion
asQuaternion(self)
Returns: a quaternion representing the same rotation
(Scientific.Geometry.Vector, float)
axisAndAngle(self)
Returns: the axis (a normalized vector) and angle (in radians).
Transformation
inverse(self)
Returns: the inverse transformation
Rotation
rotation(self)
Returns: the rotational component
 
screwMotion(self)
Returns: the four parameters (reference, direction, angle, distance) of a screw-like motion that is equivalent to the transformation.
list of N.array
threeAngles(self, e1, e2, e3, tolerance=1e-07)
Find three angles a1, a2, a3 such that Rotation(a1*e1)*Rotation(a2*e2)*Rotation(a3*e3) is equal to the rotation object.
Translation
translation(self)
Returns: the translational component.
Class Variables
  is_rotation = 1
Method Details

__call__(self, other)
(Call operator)

 
Parameters:
  • vector - the input vector
Returns: Scientific.Geometry.Vector
the transformed vector
Overrides: Transformation.__call__
(inherited documentation)

__init__(self, *args)
(Constructor)

 

There are two calling patterns:

asQuaternion(self)

 
Returns: Scientific.Geometry.Quaternion.Quaternion
a quaternion representing the same rotation

axisAndAngle(self)

 
Returns: (Scientific.Geometry.Vector, float)
the axis (a normalized vector) and angle (in radians). The angle is in the interval (-pi, pi]

inverse(self)

 
Returns: Transformation
the inverse transformation
Overrides: Transformation.inverse
(inherited documentation)

rotation(self)

 
Returns: Rotation
the rotational component
Overrides: RigidBodyTransformation.rotation
(inherited documentation)

screwMotion(self)

 
Returns:
the four parameters (reference, direction, angle, distance) of a screw-like motion that is equivalent to the transformation. The screw motion consists of a displacement of distance (a float) along direction (a normalized Scientific.Geometry.Vector) plus a rotation of angle radians around an axis pointing along direction and passing through the point reference (a Scientific.Geometry.Vector).
Overrides: RigidBodyTransformation.screwMotion
(inherited documentation)

threeAngles(self, e1, e2, e3, tolerance=1e-07)

 

Find three angles a1, a2, a3 such that Rotation(a1*e1)*Rotation(a2*e2)*Rotation(a3*e3) is equal to the rotation object. e1, e2, and e3 are non-zero vectors. There are two solutions, both of which are computed.

Parameters:
Returns: list of N.array
a list containing two arrays of shape (3,), each containing the three angles of one solution
Raises:
  • ValueError - if two consecutive axes are parallel

translation(self)

 
Returns: Translation
the translational component. In the case of a mixed rotation/translation, this translation is executed after the rotation.
Overrides: RigidBodyTransformation.translation
(inherited documentation)