Figure Rotation In 3D
5 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
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!
0 Comments
See Also
Categories
Find more on Interactive Control and Callbacks 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!