Clear Filters
Clear Filters

Figure Rotation In 3D

4 views (last 30 days)
Subhiksha
Subhiksha on 30 Sep 2013
Answered: Ishu on 9 May 2024
Hello,
On executing a certain Matlab code I get a figure displayed (3D)on the screen. I am rotating the figure manually to the desired position. Now, how do I get the position of x,y,z of the rotated figure, so that I can directly use it in the code(using view) and display only the rotated position on the execution of the code instead of rotating it manually each time???
Thanks in advance.

Answers (1)

Ishu
Ishu on 9 May 2024
Hi Subhiksha,
When you rotate a 3D graph using the "Rotate 3D" option from the toolbar in the MATLAB figure window, the "Azimuth" and "Elevation" angles are displayed in the bottom left corner of the figure window. You can use these values in the "view" function to set your figure to display the rotated position automatically upon code execution.
view(az, el) % replace az and el with the values
But as soon as you release the mouse button, the information iwill no longer be displayed. To display the values as text on the figure itself, you can refer below MATLAB Answer:
For more information on "Azimuth" and "Elevation", you can refer below documentation:
Hope it helps!

Categories

Find more on Graph and Network Algorithms in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!