1 function v=hexa_volume(X)
3 % X columns are corners of hexa in this ordering
15 % row = corners of a tetra
29 text(X(1,i),X(2,i),X(3,i),num2str(i),'FontSize',16),hold on
36 vv = abs(det([XX;ones(1,4)]))/6;
38 shp = alphaShape(XX');plot(shp); hold on, drawnow
39 i,err_vv = vv - volume(shp),
42 end % volume of tetra from points ii