How to change the default origin of the axis of rotation in 3d plot matlab
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
KRUNAL
am 3 Nov. 2014
Kommentiert: Robel Fekadu
am 17 Feb. 2020
I have a data that plots a 3D figure. Now I am trying to rotate it from an point(origin) using
rotate(h,direction,alpha)
I read the defination on the mathworks and it said that the default origin point is the center of the plot box.However in my case, it is not a center point of the plot box. So how can I modify the origin to make sure I am able to rotate it around my desired point of origin?
0 Kommentare
Akzeptierte Antwort
Britt Aguda
am 30 Dez. 2016
You need to make a new 3d vector to define the origin and then add it as the fourth input parameter.
hSurface = surf(peaks(20));
direction = [1 0 0];
origin = [0 0 0]; %set origin of axis of rotation to plot origin instead of the center of object
rotate(hSurface,direction,25,origin); %add the vector to the parameters
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Visual Exploration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!