Patch and transparency issue
13 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!