Patch: Problem using FaceVertexAlphaData to control edge visibility
이전 댓글 표시
Hello Community,
I encountered an unexpected behaviour using the patch function. Creating a simple four-sided pyramid and using FaceVertexAlphaData property to control edge visibility one edge is not highlighted.
vertices = [0.0,0.0,0.0;
1.0,0.0,0.0;
1.0,1.0,0.0;
0.0,1.0,0.0;
0.5,0.5,0.5];
fvad = [1,1,1,1,0]';
faces = [1,2,5;
2,3,5;
3,4,5;
4,1,5];
figure
patch('Faces',faces,...
'Vertices',vertices,...
'FaceVertexAlphaData',fvad,...
'EdgeAlpha','flat',...
'LineWidth',1.5,...
'FaceColor','red',...
'EdgeColor','blue');
view(3);
camlight

When calling the patch function face-wise all edges will be displayed.
figure
for i=1:size(faces,1)
patch('Faces',faces(i,:),...
'Vertices',vertices,...
'FaceVertexAlphaData',fvad,...
'EdgeAlpha','flat',...
'LineWidth',1.5,...
'FaceColor','red',...
'EdgeColor','blue');
end
view(3);
camlight
Im using r2015a but the problem also occurs with r2016a.
Did I get the patch function wrong? Have you also noticed it? Is this a matlab problem?
Thank you very much in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!