Patch and transparency issue

조회 수: 13 (최근 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 CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by