Lock axis for Rotate3D
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Julius Schroers
il 30 Ott 2021
Commentato: Julius Schroers
il 2 Nov 2021
Hey,
Is it possible to lock specific axes for rotate3D?
This would be very helpful as I want to rotate my plots around the z axis only.
0 Commenti
Risposta accettata
Drishan Poovaya
il 2 Nov 2021
It is not possible to lock specific axis for rotate3D. However there is a workaround using the rotate function, using which you can fix the axis. Refer to the code snippet below as an example.
Rotate is not interactive, however by using the for loop as seen below, you can visualize rotation around any axis
% Sample plot
s = surf(peaks(20));
xlabel('x-axis')
ylabel('y-axis')
zlabel('z-axis')
% along z axis
direction = [0 0 1];
%rotate by 25 degrees
for i = 1:0.1:25
pause(0.2)
rotate(s,direction,i)
end
Documentation:
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 3-D Scene Control in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!