generate triangular mesh starting from the external nodes (rx3) of a circle
조회 수: 5 (최근 30일)
이전 댓글 표시
HI! I should generate a triangular mesh starting from the external nodes (rx3 matrix) of a circle arranged in space.
load('V.mat')
figure
plot3(V(:,1),V(:,2),V(:,3),'r.','Markersize',5)
grid on
xlabel('x')
ylabel('y')
zlabel('z')
view([15,50,30])
axis equal
채택된 답변
Matt J
2023년 9월 25일
load V
V=num2cell(V,1);
[x,y,z]=deal(V{:});
trisurf(delaunay(x,y), x,y,z)
댓글 수: 2
Bruno Luong
2023년 9월 25일
load V;
stlwrite(triangulation(delaunay(V(:,[1 2])),V),'mycircle.stl')
추가 답변 (1개)
Bruno Luong
2023년 9월 25일
편집: Bruno Luong
2023년 9월 25일
load V;
n=size(V,1); % 360
stlwrite(triangulation([ones(n-2,1) (2:n-1)' (3:n)'],V),'mycircle.stl')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!