필터 지우기
필터 지우기

surf 2 solid question

조회 수: 8 (최근 30일)
Matthew
Matthew 2023년 10월 25일
댓글: Matthew 2023년 10월 25일
can't quite seem to get this to work..
sidelength = input('Enter Side length: ');
height = input('Enter Height: ');
V=nsidedpoly(12,'Side',sidelength).Vertices;
V(end+1,3)=-height;
trisurf( delaunay(V(:,1:2)), V(:,1), V(:,2), V(:,3),'FaceColor','c')
surf2solid( ?? ,'thickness', 0.2); axis image; camlight;

채택된 답변

Walter Roberson
Walter Roberson 2023년 10월 25일
편집: Walter Roberson 2023년 10월 25일
sidelength = input('Enter Side length: ');
height = input('Enter Height: ');
V=nsidedpoly(12,'Side',sidelength).Vertices;
V(end+1,3)=-height;
h = trisurf( delaunay(V(:,1:2)), V(:,1), V(:,2), V(:,3),'FaceColor','c')
FV = struct('vertices', h.Vertices, 'faces', h.Faces);
surf2solid( FV ,'thickness', 0.2); axis image; camlight;
  댓글 수: 1
Matthew
Matthew 2023년 10월 25일
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by