Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

2 visualizaciones (últimos 30 días)
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

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by