Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Rotate object about specified origin and direction

`rotate(h,direction,alpha)`

rotate(...,origin)

The `rotate`

function rotates a graphics object
in three-dimensional space.

`rotate(h,direction,alpha)`

rotates
the graphics object `h`

by `alpha`

degrees.
Specify `h`

as a surface, patch, line, text, or image
object. `direction`

is a two- or three-element vector
that describes the axis of rotation in conjunction with the origin
of the axis of rotation. The default origin of the axis of rotation
is the center of the plot box. This point is not necessarily the origin
of the axes.

Positive `alpha`

is defined as the righthand-rule
angle about the direction vector as it extends from the origin of
rotation.

If `h`

is an array of handles, all objects
must be children of the same axes.

`rotate(...,origin)`

specifies
the origin of the axis of rotation as a three-element vector` [x`

. _{0},y_{0},z_{0}]

Was this topic helpful?