M-File Help: tranimate | View code for tranimate

# tranimate

Animate a coordinate frame

tranimate(p1, p2, options) animates a 3D coordinate frame moving from pose p1 to pose p2. Poses p1 and p2 can be represented by:

- homogeneous transformation matrices (4x4)
- orthonormal rotation matrices (3x3)
- Quaternion

tranimate(p, options) animates a coordinate frame moving from the identity pose to the pose p represented by any of the types listed above.

tranimate(pseq, options) animates a trajectory, where pseq is any of

- homogeneous transformation matrix sequence (4x4xN)
- orthonormal rotation matrix sequence (3x3xN)
- Quaternion vector (Nx1)

## Options

'fps', fps | Number of frames per second to display (default 10)
'nsteps', n | The number of steps along the path (default 50)
'axis', A | Axis bounds [xmin, xmax, ymin, ymax, zmin, zmax]
'movie', M | Save frames as files in the folder M

## Notes

- The 'movie' options saves frames as files NNNN.png.
- When using 'movie' option ensure that the window is fully visible.
- To convert frames to a movie use a command like:

    ffmpeg -r 10 -i %04d.png out.avi

## See also

trplot

© 1990-2014 Peter Corke.