Patch and transparency issue
Afficher commentaires plus anciens
I want to make an non transparent cube:
I specify the connectivity:
vec=[1,2,4,3,1;1,5,6,2,1;1,5,7,3,1];
vec2=[8,4,3,7,8;8 4 2 6 8;8 6 5 7 8];
cube = [0 0 0;0 0 1;0 1 0;0 1 1; 1 0 0; 1 0 1; 1 1 0; 1 1 1];
figure
patch('Faces',[vec(1,:),vec(2,:),vec(3,:)],'Vertices',cube,'FaceColor','white','FaceAlpha',1); axis equal; cameratoolbar;
hold on
patch('Faces',[vec2(1,:),vec2(2,:),vec2(3,:)],'Vertices',cube,'FaceColor','white','FaceAlpha',1); axis equal; cameratoolbar;
However the result is somehow transparent :

So some faces are transparent, some are half transparent, I do not get this. Generalizing the question (I do not care for a cube of course, just some general 3d-hexahedron): Transparency seems to be doing something else than I expect. Any ideas why?
Réponses (0)
Catégories
En savoir plus sur Polygons dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!