フィルターのクリア

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 Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by