Filter löschen
Filter löschen

surf 2 solid question

8 Ansichten (letzte 30 Tage)
Matthew
Matthew am 25 Okt. 2023
Kommentiert: Matthew am 25 Okt. 2023
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;

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Okt. 2023
Bearbeitet: Walter Roberson am 25 Okt. 2023
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;

Weitere Antworten (0)

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by