How to set the shadow in the trimesh figure?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!