Patch: Problem using FaceVertexAlphaData to control edge visibility
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de 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!