0001 function vb_plot_surf(V,F,fclr,eclr,light_mode,max_mode)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 if ~exist('fclr','var') | isempty(fclr), fclr = [0.8 0.7 0.6]; end;
0017 if ~exist('eclr','var') | isempty(eclr), eclr = 'none'; end;
0018 if ~exist('light_mode','var') | isempty(light_mode), light_mode=0; end;
0019 if ~exist('max_mode','var') | isempty(max_mode), max_mode=0; end;
0020
0021
0022 patch('Faces',F,'Vertices',V,'FaceColor',fclr,'EdgeColor',eclr);
0023 lighting phong;
0024 material dull;
0025 axis equal
0026
0027 xlabel('X');
0028 ylabel('Y');
0029 zlabel('Z');
0030
0031 if max_mode == 1
0032 Vmax = max(V);
0033 Vmin = min(V);
0034 xlim([Vmin(1) Vmax(1)]);
0035 ylim([Vmin(2) Vmax(2)]);
0036 zlim([Vmin(3) Vmax(3)]);
0037 end
0038 if light_mode == 1
0039 camlight(-60,0);
0040 camlight(60,0);
0041 camlight(180,0);
0042
0043 end