Skip to content

Commit

Permalink
Reference similar functions through see also sec.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Sep 28, 2023
1 parent 594a765 commit e36c44d
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 4 deletions.
9 changes: 9 additions & 0 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,15 @@ Apply Transformations
~pytransform3d.transformations.scale_transform
~pytransform3d.transformations.adjoint_from_transform

Position+Quaternion Operations
------------------------------

.. autosummary::
:toctree: _apidoc/
:template: function.rst

~pytransform3d.transformations.pq_slerp

Dual Quaternion Operations
--------------------------

Expand Down
33 changes: 33 additions & 0 deletions pytransform3d/rotations/_slerp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ def axis_angle_slerp(start, end, t):
-------
a : array, shape (4,)
Interpolated axis of rotation and rotation angle: (x, y, z, angle)
See Also
--------
quaternion_slerp :
SLERP for quaternions.
rotor_slerp :
SLERP for rotors.
pytransform3d.transformations.pq_slerp :
SLERP for position + quaternion.
"""
start = check_axis_angle(start)
end = check_axis_angle(end)
Expand Down Expand Up @@ -54,6 +65,17 @@ def quaternion_slerp(start, end, t, shortest_path=False):
-------
q : array, shape (4,)
Interpolated unit quaternion to represent rotation: (w, x, y, z)
See Also
--------
axis_angle_slerp :
SLERP for axis-angle representation.
rotor_slerp :
SLERP for rotors.
pytransform3d.transformations.pq_slerp :
SLERP for position + quaternion.
"""
start = check_quaternion(start)
end = check_quaternion(end)
Expand Down Expand Up @@ -137,6 +159,17 @@ def rotor_slerp(start, end, t, shortest_path=False):
-------
rotor : array, shape (4,)
Interpolated rotor: (a, b_yz, b_zx, b_xy)
See Also
--------
axis_angle_slerp :
SLERP for axis-angle representation.
quaternion_slerp :
SLERP for quaternions.
pytransform3d.transformations.pq_slerp :
SLERP for position + quaternion.
"""
start = check_rotor(start)
end = check_rotor(end)
Expand Down
6 changes: 6 additions & 0 deletions pytransform3d/transformations/_dual_quaternion_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ def dual_quaternion_sclerp(start, end, t):
Kavan, Collins, O'Sullivan, Zara: Dual Quaternions for Rigid Transformation
Blending (2006), Technical report, Trinity College Dublin,
https://users.cs.utah.edu/~ladislav/kavan06dual/kavan06dual.pdf
See Also
--------
pq_slerp :
An alternative approach is spherical linear interpolation (SLERP) with
position and quaternion.
"""
start = check_dual_quaternion(start)
end = check_dual_quaternion(end)
Expand Down
19 changes: 15 additions & 4 deletions pytransform3d/transformations/_pq_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ def pq_slerp(start, end, t):
We will use spherical linear interpolation (SLERP) for the quaternion and
linear interpolation for the position.
An alternative approach is screw linear interpolation (ScLERP) with dual
quaternions (see
:func:`pytransform3d.transformations.dual_quaternion_sclerp`).
Parameters
----------
start : array-like, shape (7,)
Expand All @@ -29,6 +25,21 @@ def pq_slerp(start, end, t):
-------
pq_t : array-like, shape (7,)
Position and orientation quaternion: (x, y, z, qw, qx, qy, qz)
See Also
--------
dual_quaternion_sclerp :
An alternative approach is screw linear interpolation (ScLERP) with
dual quaternions.
pytransform3d.rotations.axis_angle_slerp :
SLERP for axis-angle representation.
pytransform3d.rotations.quaternion_slerp :
SLERP for quaternions.
pytransform3d.rotations.rotor_slerp :
SLERP for rotors.
"""
start = check_pq(start)
end = check_pq(end)
Expand Down

0 comments on commit e36c44d

Please sign in to comment.