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 X1 to pose X2. Poses X1 and X2 can be represented by:

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

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

tranimate(xseq, options) animates a trajectory, where xseq 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

Additional options are passed through to TRPLOT.

## Notes

- Uses the Animate helper class to record the frames.
- Poses X1 and X2 must both be of the same type
- The 'movie' options saves frames as files NNNN.png.
- To convert frames to a movie use a command like:

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

## See also

trplot, Animate

© 1990-2014 Peter Corke.