HALCON Reference Manual 10.0.2
Name
axis_angle_to_quatT_axis_angle_to_quataxis_angle_to_quatAxisAngleToQuatAxisAngleToQuat — Create a rotation quaternion.
static void HOperatorSet.AxisAngleToQuat(HTuple axisX, HTuple axisY, HTuple axisZ, HTuple angle, out HTuple quaternion)
public HQuaternion(HTuple axisX, HTuple axisY, HTuple axisZ, HTuple angle)
public HQuaternion(double axisX, double axisY, double axisZ, double angle)
void HQuaternion.AxisAngleToQuat(HTuple axisX, HTuple axisY, HTuple axisZ, HTuple angle)
void HQuaternion.AxisAngleToQuat(double axisX, double axisY, double axisZ, double angle)
Quaternions are an extension of the complex numbers. The set of quaternions
is given by {x_0 + x_1*i + x_2*j + x_3*k |
x_0,x_1,x_2,x_3 in R}. In HALCON, quaternions are
represented by a tuple containing four elements: [x_{0},x_{1},x_{2},x_{3}].
Unit quaternions can be used to describe rotations. A quaternion is a unit
quaternion if its norm is 1. A
counterclockwise rotation around an unit vector v
(AxisXAxisXAxisXAxisXaxisX, AxisYAxisYAxisYAxisYaxisY,
AxisZAxisZAxisZAxisZaxisZ) by an angle a (AngleAngleAngleAngleangle) can be described by
the unit quaternion q =(cos(a/2), sin(a/2) v).
The operator axis_angle_to_quataxis_angle_to_quataxis_angle_to_quatAxisAngleToQuatAxisAngleToQuat can be used to create such a
quaternion. To rotate a point using QuaternionQuaternionQuaternionQuaternionquaternion use the operator
quat_rotate_point_3dquat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3d.
Note that two rotations can be concatenated using the operator
quat_composequat_composequat_composeQuatComposeQuatCompose. Further, you can use a rotation quaternion to
set the orientation of the 3D plot in set_paintset_paintset_paintSetPaintSetPaint.
The operator axis_angle_to_quataxis_angle_to_quataxis_angle_to_quatAxisAngleToQuatAxisAngleToQuat does not check whether the vector
(AxisXAxisXAxisXAxisXaxisX, AxisYAxisYAxisYAxisYaxisY, AxisZAxisZAxisZAxisZaxisZ) is of unit length (i.e. of
length 1). If this is not the case, QuaternionQuaternionQuaternionQuaternionquaternion will be no valid
rotation quaternion.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
AxisXAxisXAxisXAxisXaxisX (input_control) real → HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)
X component of the rotation axis.
AxisYAxisYAxisYAxisYaxisY (input_control) real → HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)
Y component of the rotation axis.
AxisZAxisZAxisZAxisZaxisZ (input_control) real → HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)
Z component of the rotation axis.
AngleAngleAngleAngleangle (input_control) real → HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)
Rotation angle in radians.
** Normalize a vector and create a rotation quaternion
Length := sqrt(AxisX*AxisX+AxisY*AxisY+AxisZ*AxisZ)
AxisX := AxisX/Length
AxisY := AxisY/Length
AxisZ := AxisZ/Length
axis_angle_to_quat (AxisX, AxisY, AxisZ, rad(90), Quaternion)
quat_to_hom_mat3dquat_to_hom_mat3dquat_to_hom_mat3dQuatToHomMat3dQuatToHomMat3d,
quat_to_posequat_to_posequat_to_poseQuatToPoseQuatToPose,
quat_rotate_point_3dquat_rotate_point_3dquat_rotate_point_3dQuatRotatePoint3dQuatRotatePoint3d,
quat_composequat_composequat_composeQuatComposeQuatCompose
quat_normalizequat_normalizequat_normalizeQuatNormalizeQuatNormalize,
quat_conjugatequat_conjugatequat_conjugateQuatConjugateQuatConjugate,
quat_interpolatequat_interpolatequat_interpolateQuatInterpolateQuatInterpolate
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |