How to rescale a STL surface in Matlab

280 views Asked by At

I've imported a STL file in Matlab with the function stlread.

My question is, how can we rescale it with an arbitrary size factor (for instance, suppose you want to halve its dimensions)?

Here there is my piece of code in which the stl is imported and viewed:

fv = stlread ( 'Femur_Head.stl' );


patch(fv,'FaceColor',       [0.8 0.8 1.0], ...
         'EdgeColor',       'none',        ...
         'FaceLighting',    'gouraud',     ...
         'AmbientStrength', 0.15);

% Add a camera light, and tone down the specular highlighting
camlight('headlight');
material('dull');

axis([-50 50 -50 50 0 80]);
 
view([-135 35]);
 
title('Femur Head');
 
xlabel('X');ylabel('Y');zlabel('Z');
 
% Fix the axes scaling, and set a nice view angle
 
axis('image');
view([-135 35]);
 
hold on

View:

enter image description here

0

There are 0 answers