How to set the shadow in the trimesh figure?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to display surface mesh of the brain in Matlab. I used the delaunayTriangulation object and trimesh function. I need to show the 3D effect with some shadow on the mesh. So I could get some specific point coordinates on it. How to set the shadows?
I want to get the effect like below, which is from Meshlab. It doesn't plot the edges.
My matlab codes and figure is as below.
trimesh(TR,'FaceColor',ones(3,1)*0.9,'LineStyle','none');
set(gca, 'color', 'k');
I don't have the shadow on the surface to show the 3D effect.
Thank you for any suggestions.
----------------------Edited 1st time-------------------
I test some codes with lighting. Even though I don't know how to give an uniform light from every direction. I made some progress. How many camlight could make an all-sided view with shadow.
trimesh(TR,'FaceColor',ones(3,1)*0.9,'LineStyle','none');
set(gca, 'color', 'k');
lighting gouraud;
a1 = camlight('right');
a2 = camlight('left');
a3 = camlight('headlight');
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Lighting, Transparency, and Shading dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!