rotate

Purpose

Rotate an object.

Synopsis

rotate(h,azel,alpha)
rotate(h,azel,alpha,origin)

Description

rotate(h,azel,alpha) rotates the object specified by handle h through alpha degrees. The axis of rotation is specified by azel, a two-element or three-element vector. A two-element vector specifies azimuth, or horizontal rotation, and vertical elevation,

[azimuth  elevation]
A three-element vector specifies the desired direction vector in Cartesian coordinates,

[x y z]
rotate(h,azel,alpha,origin) specifies the origin of rotation, origin, as a three-element vector

[x y z]

Examples

[x,y,z] = cylinder(10,25);
h = surf(x,y,z)
          

rotate(h,[90 0],45)

See Also

view, viewmtx

(c) Copyright 1994 by The MathWorks, Inc.