Download this file

32 lines (23 with data), 574 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function disp3d(V,filter_size)
if nargin==1
filter_size=9;
end
if filter_size==0
D=V;
else
D = smooth3(V,'box',filter_size);
%D = smooth3(V,'gaussian',filter_size);
end
%patch(isocaps(V,.5),...
% 'FaceColor','interp','EdgeColor','none');
p1 = patch(isosurface(D,.5),...
'FaceColor','red','EdgeColor','none');
isonormals(D,p1)
view(35,30)
axis vis3d tight
%camlight left;
camlight right;
lighting phong
%set(gcf,'Renderer','zbuffer'); lighting phong
%set(p1,'SpecularColorReflectance',0,'SpecularExponent',50)
end