Showing revision 1.0

qmeshcut: Fast Tetrahedral Mesh Cross-sectional Plot

1. Detailed help info:
2. parameters:
3. outputs
4. example:
4.1.1. example output
5. notes

1. Detailed help info:

[cutpos,cutvalue,facedata]=qmeshcut(elem,node,value,plane)

Fast tetrahedral mesh cross-section plot, by Qianqian Fang, <fangq at nmr.mgh.harvard.edu>

2. parameters:

elem
integer array with dimensions of NE x 4, each row contains the indices of all the nodes for each tetrahedron
node
node coordinates, 3 columns for x, y and z, respectively
value
a scalar array with the length of node numbers, can have multiple columns
plane
defines a plane by 3 points: plane=[x1 y1 z1;x2 y2 z2;x3 y3 z3]

3. outputs

cutpos
all the intersections of mesh edges by the plane
;cutpos is similar to node, containing 3 columns for x/y/z
cutvalue
interpolated values at the intersections, with row number being the num. of the intersections, column number is the same as "value".
facedata
define the intersection polygons in the form of patch "Faces"

the outputs of this subroutine can be easily viewed using

    patch('Vertices',cutpos,'Faces',facedata,'FaceVertexCData',cutvalue,'FaceColor','interp');  

4. example:

please run sample/demo_qmeshcut_ex1.m

4.1.1. example output

upload:qmeshcut_sample.png

5. notes

This function is not included in iso2mesh 1.5.1. You can get it via CVS. It will be included in the next release of this toolbox. One can also download an early version of qmeshcut.m from Matlab File Exchange.

Powered by Habitat