Question

So I have a program in matlab that makes a movie. The movie is made up of frames that look like this:

Now the camera angle is set by doing this:

campos(1.0e+002 *[1.317650052908556 -1.507231720261665 0.834498724031213]);

Those numbers are used by rotating to the correct view with the camera toolbar then using the command:

 get(gca, 'CameraPosition')

Now I want to set the zoom of the camera. How can I do this?

Note: Zooming to the correct position and doing the get command described above does not return anyhting differant. It is the same for all zoom positions.

Was it helpful?

Solution

You can use the property CameraViewAngle to control the zoom of the camera, e.g.

set(gca, 'CameraViewAngle', 0.5)

to set an angle or

get(gca, 'CameraViewAngle')

to query the current view angle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top