%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% demo script for mesh generation from surface patches and bounding box %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0002 % demo script for mesh generation from surface patches and bounding box 0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0004 0005 %% preparation 0006 % user must add the path of iso2mesh to matlab path list 0007 % addpath('../'); 0008 0009 % user need to add the full path to .../iso2mesh/bin directory 0010 % to windows/Linux/Unix PATH environment variable 0011 0012 %% load the sample data 0013 load tube_surface.mat 0014 0015 % f and v stores the surface patch faces and nodes 0016 %% perform mesh generation 0017 [node,elem,face]=surf2mesh(v,f,[1 1 1],[100 100 100],0.1,25); 0018 0019 %% visualize the resulting mesh 0020 plotmesh(node,face(:,1:3)); 0021 axis equal;