How to fix a figure settings after orbiting the camera, to the exact angle that I need in a 3D plot?

4 views (last 30 days)
I have a complex 3D plot, with an animation that I am saving as a video, generated by motion data with (x,y,z) data of several points of an object. The problem is that using the [caz, cel]/view settings is not doing the trick in my code and after plotting the data in 3D, I need to change the camera orbit to the appropriate angle where I can see the correct side of the object. The question is: how to fix the angle of the camera and all settings of the figure and apply it programatically within my code, so that I can save the video with the appropriate view?
  1 Comment
Rita Aoun
Rita Aoun on 20 Sep 2021
I figured it out using the set function for the camera toolbar properties.
It goes like this:
Manualview1.CameraViewAngleMode = 'manual';
Manualview1.CameraUpVectorMode = 'manual';
Manualview1.CameraPositionMode = 'manual';
Manualview1.view=[-1e+02,14];
Manualview1.Projection = 'orthographic';
Manualview1.CameraPosition = [-805,1675,551];
Manualview1.CameraUpVector = [0.4,0.9,0.2];
Manualview1.CameraViewAngle = 6.6;
set(gca,Manualview1)

Sign in to comment.

Answers (0)

Categories

Find more on Animation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!