3d - Keep object size constant when rotating 3-D Matlab plot -


i trying generate set of views of 3-d object in matlab such angle changes object size stays constant. because matlab tries fit entire axis view, object shrink or grow depending on whether plot viewed head-on or @ angle. example:

[x,y,z] = sphere(50); % coordinates of sphere surf(x,y,z);          % plot sphere axis image off view(0,0)             % @ angle sphere fills axes view(-37.5,30)        % @ angle sphere smaller 

how can make sphere appears same size no matter angle it's viewed at?

the axis function friend here. try adding

axis vis3d 

from help, "axis vis3d freezes aspect ratio properties enable rotation of 3-d objects , overrides stretch-to-fill." if you're interested same can accomplished via

ax = gca; props = {'cameraviewangle','dataaspectratio','plotboxaspectratio'}; set(ax,props,get(ax,props)); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -