12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

camorbitPurpose2camorbitRotate the camera position around the camera targetSyntaxDescriptioncamorbit(dtheta,dphi)camorbit(dtheta,dphi,'coordsys')camorbit(dtheta,dphi,'coordsys','direction')camorbit(axes_handle,...)camorbit(dtheta,dphi) rotates the camera position around the cameratarget by the amounts specified in dtheta and dphi (both in degrees). dthetais the horizontal rotation and dphi is the vertical rotation.camorbit(dtheta,dphi,'coordsys') The coordsys argument determinesthe center of rotation. It can take on two values:• data (default) – rotate the camera around an axis defined by the cameratarget and the direction (default is the positive z direction).• camera – rotate the camera about the point defined by the camera target.camorbit(dtheta,dphi,'coordsys','direction') The directionargument, in conjunction with the camera target, defines the axis of rotationfor the data coordinate system. Specify direction as a three-element vectorcontaining 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.camorbit(axes_handle,...) operates on the axes identified by the firstargument, axes_handle. When you do not specify an axes handle, camorbitoperates on the current axes.ExamplesCompare rotation in the two coordinate systems with these for loops. The firstrotates the camera horizontally about a line defined by the camera target pointand a direction that is parallel to the y-axis. Visualize this rotation as a cone2-57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!