To understand the MATLAB® viewing model, see View Overview.
view | Camera line of sight |
rotate | Rotate object about specified origin and direction |
makehgtform | Create 4-by-4 transform matrix |
viewmtx | View transformation matrices |
cameratoolbar | Control camera toolbar programmatically |
campan | Rotate camera target around camera position |
camzoom | Zoom in and out on scene |
camdolly | Move camera position and target |
camlookat | Position camera to view object or group of objects |
camorbit | Rotate camera position around camera target |
campos | Set or query camera position |
camproj | Set or query projection type |
camroll | Rotate camera about view axis |
camtarget | Set or query location of camera target |
camup | Set or query camera up vector |
camva | Set or query camera view angle |
Axes Properties | Axes appearance and behavior |
View Control with the Camera Toolbar
The Camera toolbar enables you to perform a number of viewing operations interactively.
Graphics provides functionality, analogous to that of a camera with a zoom lens, that enables you to control the view of the scene.
Understanding View Projections
Graphics supports both orthographic and perspective projection types for displaying 3-D graphics. The one you select depends on the type of graphics you are displaying.
Camera graphics is based on a group of axes properties that control the position and orientation of the camera.
Setting the Viewpoint with Azimuth and Elevation
You can control the orientation of axes using graphics functions.
The camdolly
function allows you to move both the position
of the camera and the position of the camera target in unison.
Moving the Camera Through a Scene
This example shows how to move a camera along a path traced by a stream line and how to move a light source with the camera.
Manipulating Axes Aspect Ratio
There are several axes properties that control the aspect ratio. Set these properties to achieve the effect you want.