Opening angle of the camera lense
|Objects||ViewingAngle Default Values|
ViewingAngle defines the viewing angle of
a camera. It is also known as the "opening angle" of
the camera's lense and is determined by its focal length.
Small viewing angles correspond to a tele lense, large opening angles to a wide angle lense. Angles close to π correspond to an (extreme) fish eye lense.
The values for
ViewingAngle have to be given
in radians. The angles should be larger than
than π. Other values
are replaced by some small positive angle or by an angle slightly
less than π, respectively.
Note that when using a wide angle lense, the scene may fill only a part of the drawing area. With a tele lense, only parts of the scene may be visible.
When using a camera object with a given
Position, you have to
find out experimentally what viewing angle is suitable to make the
scene fill a reasonable portion of the drawing area.
ViewingAngle does not have any effect when
set for the camera.
In fact, when a parallel projection without perspective distortion
is desired, one should not position the camera
far away from the scene and use an extreme tele lense (i.e, very small
ViewingAngle can be animated. Increasing
or decreasing values of
to "zooming out" or "zooming in", respectively.
When creating a camera object, the third argument is the
camera:= plot::Camera([5, 5, 5], [0, 0, 0], PI/4): camera::ViewingAngle
ViewingAngle. With the initial
scene is fully visible (but rather small). Zooming in by decreasing
the viewing angle, only parts of the scene are visible:
f := plot::Function3d(sin(x^3 - y^2), x = -2..2, y = -2..2, Submesh = [2, 2]): camera:= plot::Camera([5, 5, 5], [0, 0, 0], (1 - a)*PI/3 + a*PI/10, a = 0..1, Frames = 200): plot(f, camera)
delete f, camera: