ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle¶
- class EulerAngle(*args, **kwargs)¶
Bases:
pybind11_objectOverloaded function.
__init__(self: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle, phi: ostk::mathematics::geometry::Angle, theta: ostk::mathematics::geometry::Angle, psi: ostk::mathematics::geometry::Angle, axis_sequence: ostk::mathematics::geometry::d3::transformation::rotation::EulerAngle::AxisSequence) -> None
Create Euler angles from three angle components and axis sequence.
- Args:
phi (Angle): The first rotation angle. theta (Angle): The second rotation angle. psi (Angle): The third rotation angle. axis_sequence (EulerAngle.AxisSequence): The axis sequence (XYZ, ZXY, ZYX).
- Example:
>>> phi = Angle.degrees(30.0) >>> theta = Angle.degrees(45.0) >>> psi = Angle.degrees(60.0) >>> euler = EulerAngle(phi, theta, psi, EulerAngle.AxisSequence.XYZ)
__init__(self: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle, vector: numpy.ndarray[numpy.float64[3, 1]], angle_unit: ostk::mathematics::geometry::Angle::Unit, axis_sequence: ostk::mathematics::geometry::d3::transformation::rotation::EulerAngle::AxisSequence) -> None
Create Euler angles from a 3D vector with specified angle unit and axis sequence.
- Args:
vector (numpy.array): Vector containing the three angle values. angle_unit (Angle.Unit): The unit of the angles in the vector. axis_sequence (EulerAngle.AxisSequence): The axis sequence.
- Example:
>>> vector = numpy.array([30.0, 45.0, 60.0]) >>> euler = EulerAngle(vector, Angle.Unit.Degree, EulerAngle.AxisSequence.XYZ)
Methods
Check if the Euler angle is defined.
Check if this Euler angle is near another Euler angle within tolerance.
Check if the Euler angle represents a unit rotation.
Create Euler angles from a quaternion with specified axis sequence.
Overloaded function.
Convert the Euler angle to a 3D vector with specified unit.
Create an undefined Euler angle.
Create a unit Euler angle (no rotation).
Create Euler angles with XYZ axis sequence.
Create Euler angles with ZXY axis sequence.
Create Euler angles with ZYX axis sequence.
Attributes
axis_sequencephipsitheta- is_defined( ) bool¶
Check if the Euler angle is defined.
- Returns:
True if the Euler angle is defined, False otherwise.
- Return type:
Example
>>> euler = EulerAngle(phi, theta, psi, EulerAngle.AxisSequence.XYZ) >>> euler.is_defined() # True
- is_near(
- self: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle,
- euler_angle: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle,
- angular_tolerance: ostk::mathematics::geometry::Angle,
- euler_angle: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle,
Check if this Euler angle is near another Euler angle within tolerance.
- Parameters:
euler_angle (EulerAngle) -- The Euler angle to compare with.
angular_tolerance (Angle) -- The angular tolerance for comparison.
- Returns:
True if angles are within tolerance, False otherwise.
- Return type:
Example
>>> euler1 = EulerAngle(phi1, theta1, psi1, sequence) >>> euler2 = EulerAngle(phi2, theta2, psi2, sequence) >>> euler1.is_near(euler2, Angle.degrees(1.0))
- is_unitary( ) bool¶
Check if the Euler angle represents a unit rotation.
- Returns:
True if the Euler angle is unitary, False otherwise.
- Return type:
Example
>>> euler = EulerAngle.unit() >>> euler.is_unitary() # True
- static quaternion(
- quaternion: ostk.mathematics.geometry.d3.transformation.rotation.Quaternion,
- axis_sequence: ostk::mathematics::geometry::d3::transformation::rotation::EulerAngle::AxisSequence,
Create Euler angles from a quaternion with specified axis sequence.
- Parameters:
quaternion (Quaternion) -- The quaternion to convert.
axis_sequence (EulerAngle.AxisSequence) -- The desired axis sequence.
- Returns:
The equivalent Euler angles.
- Return type:
Example
>>> quat = Quaternion.unit() >>> euler = EulerAngle.quaternion(quat, EulerAngle.AxisSequence.XYZ)
- static rotation_matrix(
- rotation_matrix: ostk.mathematics.geometry.d3.transformation.rotation.RotationMatrix,
- axis_sequence: ostk::mathematics::geometry::d3::transformation::rotation::EulerAngle::AxisSequence,
- static rotation_vector(
- rotation_vector: ostk.mathematics.geometry.d3.transformation.rotation.RotationVector,
- axis_sequence: ostk::mathematics::geometry::d3::transformation::rotation::EulerAngle::AxisSequence,
- to_string(*args, **kwargs)¶
Overloaded function.
to_string(self: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle) -> ostk.core.type.String
to_string(self: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle, angle_unit: ostk::mathematics::geometry::Angle::Unit) -> ostk.core.type.String
- to_vector(
- self: ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle,
- angle_unit: ostk::mathematics::geometry::Angle::Unit,
Convert the Euler angle to a 3D vector with specified unit.
- Parameters:
angle_unit (Angle.Unit) -- The unit for the output vector angles.
- Returns:
A vector containing [phi, theta, psi] in the specified unit.
- Return type:
Vector3d
Example
>>> euler = EulerAngle(phi, theta, psi, EulerAngle.AxisSequence.XYZ) >>> vector = euler.to_vector(Angle.Unit.Degree)
- static undefined() ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle¶
Create an undefined Euler angle.
- Returns:
An undefined Euler angle object.
- Return type:
Example
>>> undefined_euler = EulerAngle.undefined() >>> undefined_euler.is_defined() # False
- static unit() ostk.mathematics.geometry.d3.transformation.rotation.EulerAngle¶
Create a unit Euler angle (no rotation).
- Returns:
A unit Euler angle representing no rotation.
- Return type:
Example
>>> unit_euler = EulerAngle.unit() >>> unit_euler.is_unitary() # True
- static xyz(
- phi: ostk::mathematics::geometry::Angle,
- theta: ostk::mathematics::geometry::Angle,
- psi: ostk::mathematics::geometry::Angle,
- theta: ostk::mathematics::geometry::Angle,
Create Euler angles with XYZ axis sequence.
- Parameters:
- Returns:
An Euler angle with XYZ sequence.
- Return type:
Example
>>> euler = EulerAngle.xyz(Angle.degrees(30.0), Angle.degrees(45.0), Angle.degrees(60.0))
- static zxy(
- phi: ostk::mathematics::geometry::Angle,
- theta: ostk::mathematics::geometry::Angle,
- psi: ostk::mathematics::geometry::Angle,
- theta: ostk::mathematics::geometry::Angle,
Create Euler angles with ZXY axis sequence.
- Parameters:
- Returns:
An Euler angle with ZXY sequence.
- Return type:
Example
>>> euler = EulerAngle.zxy(Angle.degrees(30.0), Angle.degrees(45.0), Angle.degrees(60.0))
- static zyx(
- phi: ostk::mathematics::geometry::Angle,
- theta: ostk::mathematics::geometry::Angle,
- psi: ostk::mathematics::geometry::Angle,
- theta: ostk::mathematics::geometry::Angle,
Create Euler angles with ZYX axis sequence.
- Parameters:
- Returns:
An Euler angle with ZYX sequence.
- Return type:
Example
>>> euler = EulerAngle.zyx(Angle.degrees(30.0), Angle.degrees(45.0), Angle.degrees(60.0))