Complete example

Rotation specifications (Z-X-Z Euler angles)

start = {Pi/200, Pi/200, Pi/200} ; stop = {Pi, Pi, Pi} ; n = 30 ;

Rotation – Euler angle interpolation

tstEuler = rotEuler[start, stop, n, s2] ;

RowBox[{Estimated distance traveled of selected points = , , 52.6173}]

Rotation – Quaternion interpolation (Lerp)

tstLerp = rotLerp[start, stop, n, s2] ;

RowBox[{Estimated distance traveled of selected points = , , 26.7171}]

Rotation – Quaternion interpolation (Slerp)

tstSlerp = rotQuat[start, stop, n, s2] ;

RowBox[{Estimated distance traveled of selected points = , , 26.7186}]

Visualization

Euler angle interpolation  (To animate, select second bracket from left, go to Cell menu and choose "Animate Graphics.")

vis[tstEuler] ;

[Graphics:../anim1.gif]

Lerp interpolation (To animate, select second bracket from left, go to Cell menu and choose "Animate Graphics.")

vis[tstLerp] ;

[Graphics:../anim2.gif]

Slerp interpolation (To animate, select second bracket from left, go to Cell menu and choose "Animate Graphics.")

vis[tstSlerp] ;

[Graphics:../anim3.gif]

End point trajectories (Euler angles)

vis2[tstEuler] ;

[Graphics:../HTMLFiles/index_123.gif]

End point trajectories (Lerp interpolation)

vis2[tstLerp] ;

[Graphics:../HTMLFiles/index_125.gif]

End point trajectories (Slerp interpolation)

vis2[tstSlerp] ;

[Graphics:../HTMLFiles/index_127.gif]


Created by Mathematica  (September 7, 2003)