How to put names on the six faces of a cube so that they do not disappear in the cube?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Vertices = [0 0 0; 1 0 0; 1 1 0; 0 1 0; 0 0 1; 1 0 1; 1 1 1; 0 1 1];
Faces = [1 2 6 5; 2 3 7 6; 3 4 8 7; 4 1 5 8; 1 2 3 4; 5 6 7 8]
h = patch('Vertices',Vertices,'Faces',Faces, 'FaceVertexCData',hsv(6),'FaceColor','flat')
view(3); axis square
for k = 1:6, text(mean(Vertices(Faces(k,:),1)), ... mean(Vertices(Faces(k,:),2)), ... mean(Vertices(Faces(k,:),3)), ... num2str(k), 'Fontsize',44) end return
0 Kommentare
Siehe auch
Kategorien
Mehr zu Polygons finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!