quaternion/rt_plot - display a quaternion as a 3D rotation[view code]
|string||optional value (string)||meaning|
|"X"||color1||control display of X-axis color. Default color is "black"|
|"Y"||color2||control display of Y-axis color. Default color is "black"|
|"Z"||color3||control display of Z-axis color. Default color is "black"|
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.
// 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");
Corke, P.I. "A Robotics Toolbox for MATLAB", IEEE Robotics and Automation Magazine, Volume 3(1), March 1996, pp. 24-32