rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
coord_faces_alu3d_hexa.m
1 function [XX,YY,ZZ] = coord_faces_alu3d_hexa(M)
2 %function [XX,YY,ZZ] = coord_faces_alu3d_hexa(M)
3 %
4 % function collecting the coordinates of the face patches
5 % the columns of XX,YY,ZZ represent the x,y,z coordinates of all 4 face points
6 % result is therefore 3 matrices of size 4 x M.num_faces
7 % the resulting matrices can directly be used in 'patch' for example.
8 
9 % Bernard Haasdonk 16.3.2006
10 
11  faces_el_ind = M.faces(3:6,:);
12  linvind = faces_el_ind(:)+1; % matlab/C-offset
13  XX = reshape(M.vertices(1,linvind),4,M.num_faces);
14  YY = reshape(M.vertices(2,linvind),4,M.num_faces);
15  ZZ = reshape(M.vertices(3,linvind),4,M.num_faces);
16 
17 
18 
19 % TO BE ADJUSTED TO NEW SYNTAX
20 %| \docupdate