Scilab Function
Last update : April 2007

quaternion/rt_plot - display a quaternion as a 3D rotation[view code]

Calling Sequence

rt_plot(Q [, <args>])

Parameters

Description

rt_plot is overloaded for quaternion objects and displays a 3D plot which shows how the standard axes are transformed under the rotation descibed by Q.

Examples

   // This example shows how rt_plot() can be used to shows how the standard
   // axes are transformed after a rotation of 0.3radians about the Z-axis.

   // A rotation of 0.3radians about the Z-axis
   T = rt_rotz(0.3),

   // Create a new graphic window and set a point of view
   h0 = scf(0); a0 = h0.children;
   a0.tight_limits = "on"; a0.rotation_angles = [68, 40];

   // Plot the Scilab-World coordinate frame.
   // X, Y, and Z axes are in black (default color).
   rt_plot(rt_quaternion(eye(3,3)));

   // Plot the coordinate frame after the rotation.
   // The Z-axis is in red whereas the X and the Y axes are in blue.
   // Clearly the Z-axis is invariant under this rotation.
   rt_plot(rt_quaternion(T), "X", "blue", "Y", "blue", "Z", "red");

  

See Also

rt_quaternion,  

Authors

original Matlab version by

Peter I. Corke CSIRO Manufacturing Science and Technology

Scilab implementation by

Matteo Morelli Interdepartmental Research Center "E. Piaggio", University of Pisa

Bibliography

Corke, P.I. "A Robotics Toolbox for MATLAB", IEEE Robotics and Automation Magazine, Volume 3(1), March 1996, pp. 24-32

Get the Robotics Toolbox for Scilab/Scicos at SourceForge.net. Fast, secure and Free Open Source software downloads