use patch to plot hexahedron with 20 nodes
Mostra commenti meno recenti
hi
i have a hexaedron with 20 nodes
i have coordonates X Y Z
and the conectivity [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20];
and the stress value of all nodes TZ
TZ=[ -0.0225
-0.0226
-0.0233
-0.0185
-0.0188
-0.0144
-0.0144
-0.0141
-0.0062
-0.0064
0
0
0
-0.0209
-0.0216
-0.0126
-0.0123
0
0
-0.0137]
how can i use patch to plot my hexaedon and take all nodes to make interpolation for facecolor ith TZ
i use this
patch('Faces',Rectangles,'Vertices',[Vertice(:,1) Vertice(:,2) Vertice(:,3)],'FaceVertexCData',TZ,'FaceColor','interp','Marker','.');
vertice is X Y Z for the hexaedron
TZ is color face
but when i come to determine rectangle or the point to make faces i have problem
i wante to use all points of hexaedre

i do this but it deasnt work
Bricks =[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20];
Rectangles=[];
Rectangles=[Rectangles ; [Bricks(:,1) Bricks(:,2) Bricks(:,3) Bricks(:,4) Bricks(:,5) Bricks(:,6) Bricks(:,7) Bricks(:,8)]];
Rectangles=[Rectangles ; [Bricks(:,13) Bricks(:,14) Bricks(:,15) Bricks(:,16) Bricks(:,17) Bricks(:,18) Bricks(:,19) Bricks(:,20)]];
Rectangles=[Rectangles ; [Bricks(:,1) Bricks(:,2) Bricks(:,3) Bricks(:,10) Bricks(:,15) Bricks(:,14) Bricks(:,13) Bricks(:,9)]];
Rectangles=[Rectangles ; [Bricks(:,3) Bricks(:,4) Bricks(:,5) Bricks(:,11) Bricks(:,17) Bricks(:,16) Bricks(:,15) Bricks(:,10)]];
Rectangles=[Rectangles ; [Bricks(:,5) Bricks(:,6) Bricks(:,7) Bricks(:,12) Bricks(:,19) Bricks(:,18) Bricks(:,17) Bricks(:,11)]];
Rectangles=[Rectangles ; [Bricks(:,7) Bricks(:,8) Bricks(:,1) Bricks(:,9) Bricks(:,13) Bricks(:,20) Bricks(:,19) Bricks(:,12)]];
some one tell me use rectangle and take just the point of a corner but it give me a wrong resultat
thank you for any help
2 Commenti
Mario Malic
il 13 Nov 2020
Try to create patch for only one face, once you manage to do it, work your way towards patching all the faces.
alize beemiel
il 13 Nov 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
