Home > SRC > PLOT_CELLS.m

PLOT_CELLS

PURPOSE ^

plot cells of canonical configuration

SYNOPSIS ^

function PLOT_CELLS(cell_shape,fname_cells)

DESCRIPTION ^

 plot cells of canonical configuration
 
 Input:
     1. cell_shape
     2. fname_cells

 Output: 
     1 figure with title of "Cells of canonical configuration"

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function PLOT_CELLS(cell_shape,fname_cells)
0002 
0003 % plot cells of canonical configuration
0004 %
0005 % Input:
0006 %     1. cell_shape
0007 %     2. fname_cells
0008 %
0009 % Output:
0010 %     1 figure with title of "Cells of canonical configuration"
0011 
0012 if (cell_shape == 2)
0013     [ncell,facets_cell,facets_labels_cell,nodes_cell,pt_in_cell,center,normal,Rcell,nslice_vec,nodes_ind_bottomring,nodes_ind_topring] ...
0014         = create_cylinders_geometry(fname_cells,0);    
0015 elseif (cell_shape == 1)
0016     [ncell,facets_cell,facets_labels_cell,nodes_cell,pt_in_cell,center,normal,Rcell] = ...
0017         create_ellipses_geometry(fname_cells,0);
0018 end
0019 
0020 facets = [];
0021 nodes = [];
0022 offset = 0;
0023 
0024 boundary_attribute = [];
0025 nboundary = 0;
0026 for icell = 1:ncell
0027     facets = [facets,facets_cell{icell}+offset];    
0028     nfacets = size(facets_cell{icell},2);
0029     nnodes = size(nodes_cell{icell},1);            
0030     boundary_attribute = [boundary_attribute;facets_labels_cell{icell}'+nboundary];    
0031     nboundary = nboundary + max(facets_labels_cell{icell}');
0032     nodes = [nodes;nodes_cell{icell}];
0033     offset = offset+nnodes;
0034 end
0035 
0036 figure; 
0037 h = trisurf(facets',nodes(:,1),nodes(:,2),nodes(:,3)); 
0038 set(h,'facealpha',1); view(3); axis equal;
0039 title('Cells of canonical configuration');

Generated on Mon 28-Jan-2019 12:43:57 by m2html © 2005