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일

0 개 추천

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;

추가 답변 (0개)

카테고리

질문:

2023년 10월 25일

댓글:

2023년 10월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by