camorbit
Rotates the camera around the camera target.
Category: Graphics > Formatting and Annotation
Syntax
camorbit(dtheta, dphi)
Rotates by dtheta degrees horizontally and dphi degrees vertically.
camorbit(dtheta, dphi, 'data', axis)
Rotates around the given axis, in data coordinates.
Description
The camera moves along a sphere around the target while still looking at it, so the object appears to turn. A pair of calls with opposite angles returns to the starting view.
Input arguments
dtheta- Horizontal rotation in degrees.
dphi- Vertical rotation in degrees.
axis- Rotation axis as a 3-element vector.
Example
Turning the view
surf(peaks(20))
camorbit(45, 0)
In the app, the figure is drawn below the code.