camzoom

Zooms the camera in or out by a factor.

Category: Graphics > Formatting and Annotation

Syntax

camzoom(factor)

Zooms in by factor (above 1) or out (below 1).

Description

The call changes the camera view angle (see camva) so that the picture scales by the factor, while the camera stays in place. The relation is that the tangent of half the angle is divided by the factor. Repeated calls multiply the effects.

Input arguments

factor
Positive scalar. For 2, the objects look twice as large.

Example

Zooming in by 2

surf(peaks(10))
camva(30)
camzoom(2)
disp(round(camva, 2))
Output
   15.2600

See also

camva camdolly campos