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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

camposPurpose2camposSet or query the camera positionSyntaxDescriptioncamposcampos([camera_position])campos('mode')campos('auto'campos('manual')campos(axes_handle,...)campos with no arguments returns the camera position in the current axes.campos([camera_position]) sets the position of the camera in the currentaxes to the specified value. Specify the position as a three-element vectorcontaining the x-, y-, and z-coordinates of the desired location in the data unitsof the axes.campos('mode') returns the value of the camera position mode, which can beeither auto (the default) or manual.campos('auto') sets the camera position mode to auto.campos('manual') sets the camera position mode to manual.campos(axes_handle,...) performs the set or query on the axes identified bythe first argument, axes_handle. When you do not specify an axes handle,campos operates on the current axes.RemarksExamplescampos sets or queries values of the axes CameraPosition andCameraPositionMode properties. The camera position is the point in theCartesian coordinate system of the axes from which you view the scene.This example moves the camera along the x-axis in a series of steps:surf(peaks)axis vis3d offfor x = −200:5:200campos([x,5,10])drawnowend2-60

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

Saved successfully!

Ooh no, something went wrong!