Main Content

Camera Views

View point positioning

To understand the MATLAB® viewing model, see View Overview.


viewCamera line of sight
rotateRotate object about specified origin and direction
makehgtformCreate 4-by-4 transform matrix
viewmtxView transformation matrices
cameratoolbarControl camera toolbar programmatically
campanRotate camera target around camera position
camzoomZoom in and out on scene
camdollyMove camera position and target
camlookatPosition camera to view object or group of objects
camorbitRotate camera position around camera target
camposSet or query camera position
camprojSet or query projection type
camrollRotate camera about view axis
camtargetSet or query location of camera target
camupSet or query camera up vector
camvaSet or query camera view angle


Axes Properties Axes appearance and behavior


Tools Workflow

View Control with the Camera Toolbar

The Camera toolbar enables you to perform a number of viewing operations interactively.

Programmatic Workflow

Camera Graphics Terminology

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.

Low-Level Camera Properties

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.

Dollying the Camera

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.