Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to do 3D visualization of a multi-object volume, each object with different colors?

2 ビュー (過去 30 日間)
Sara Salimi
Sara Salimi 2017 年 6 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have already visualize a volume, that only have one object, by the following commands:
v = smooth3(vv,'box',3); % vv:volume
hpatch=patch(isosurface(v,0.5),'FaceColor',[1.0000 0.7109 0.7539],...
'EdgeColor','none',...
'AmbientStrength',.2,...
'SpecularStrength',.7,...
'DiffuseStrength',.4);
isonormals(v,hpatch)
%set(hpatch,'FaceColor',[0.2 1 0.7],'EdgeColor','none')
daspect([1,1,0.5])
view([-45,20])
axis tight
camlight right;
camlight left;
set(gcf,'Renderer','zbuffer'); lighting phong
Now I have a volume with 5 value (0:background,1:obj1, 2:obj2, 3:obj3, 4:obj4), I want to visualize each object with different colors in one view, for example:obj1 with yellow color, obj2 with green color and blah blah. How can I extend the code for multi-object 3D visualization?
Your help is appreciated

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by