How to set the shadow in the trimesh figure?

7 ビュー (過去 30 日間)
wei zhang
wei zhang 2020 年 7 月 31 日
編集済み: wei zhang 2020 年 7 月 31 日
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 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by