Patch and transparency issue

14 ビュー (過去 30 日間)
Ioannis Nemparis
Ioannis Nemparis 2017 年 11 月 22 日
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 件)

カテゴリ

Help Center および File ExchangePolygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by