| MATLAB Function Reference | ![]() |
Rotate the camera target around the camera position
Syntax
campan(dtheta,dphi) campan(dtheta,dphi,'coordsys') campan(dtheta,dphi,'coordsys','direction') campan(axes_handle,...)
Description
rotates the camera target around the camera position by the amounts specified in campan(dtheta,dphi)
dtheta and dphi (both in degrees). dtheta is the horizontal rotation and dphi is the vertical rotation.
campan(dtheta,dphi,' The coordsys')
coordsys argument determines the center of rotation. It can take on two values:
data (default) - rotate the camera target around an axis defined by the camera position and the direction (default is the positive z direction)
camera - rotate the camera about the point defined by the camera target.
campan(dtheta,dphi,' The coordsys','direction')
direction argument, in conjunction with the camera position, defines the axis of rotation for the data coordinate system. Specify direction as a three-element vector containing the x, y, and z-components of the direction or one of the characters, x, y, or z, to indicate [1 0 0], [0 1 0], or [0 0 1] respectively.
campan(axes_handle,...)
operates on the axes identified by the first argument, axes_handle. When you do not specify an axes handle, campan operates on the current axes.
See Also
axes, camdolly, camorbit, camtarget, camzoom, camroll
Controlling the Camera Viewpoint for related functions
Defining Scenes with Camera Graphics for more information
| camorbit | campos | ![]() |