Home > vbmeg > functions > plotfunc > subdirectory > vb_plot_surf.m

vb_plot_surf

PURPOSE ^

plot surface

SYNOPSIS ^

function vb_plot_surf(V,F,fclr,eclr,light_mode,max_mode)

DESCRIPTION ^

 plot surface
  vb_plot_surf(V,F,fclr,eclr,light_mode,max_mode)
 --- Input
 V : vertex coordinate
 F : patch index
 --- Optional input
 fclr = face color
 eclr = edge color
 if light_mode = 1, lighting 
 if max_mode   = 1, set axis limit

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    vb_plot_surf(V,F,fclr,eclr,light_mode,max_mode)
0002 % plot surface
0003 %  vb_plot_surf(V,F,fclr,eclr,light_mode,max_mode)
0004 % --- Input
0005 % V : vertex coordinate
0006 % F : patch index
0007 % --- Optional input
0008 % fclr = face color
0009 % eclr = edge color
0010 % if light_mode = 1, lighting
0011 % if max_mode   = 1, set axis limit
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
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     %camlight headlight;
0043 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005