Search code examples
matlab3d

Opening a STL file in Matlab


I extracted coordinates of vertices in a STL file and used these simple codes to visualize the 3D model:

for i=0:214
 fill3(A(:,i*7+3),A(:,i*7+4),A(:,i*7+5),'b');
 grid on; hold on; alpha(0.3)
end

the 3D model is a sphere-like object with 214 triangles, but I got this: enter image description here

what is wrong with it?


Solution

  • I found the problem. It was a typo! fill3 is enough to plot a STL file. Here is the result.

    enter image description here