How can I set the focal length of virtual camera in figures?

4 views (last 30 days)
Hello,
I am trying to get synthetic images of the Earth from some specific positions. I know that I can change the position, direction or field of view of a camera with code below. But is there any command to set the focal length of the camera?
E = wgs84Ellipsoid('km');
[x, y, z] = ellipsoid(0,0,0,E.SemimajorAxis, E.SemimajorAxis, E.SemiminorAxis);
figure
surf(x,y,z)
fov = 15; % Define field of view of the camera in degrees
camva(15); % Set the camera field of view
campos([-4000 -3000 50000]); % Put the camera at the origin
camtarget([0 0 1]); % The camera looks along the +Z axis

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!