File: surfseeds.m

package info (click to toggle)
octave-iso2mesh 1.9.8%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,128 kB
  • sloc: cpp: 11,982; ansic: 10,158; sh: 365; makefile: 59
file content (26 lines) | stat: -rw-r--r-- 634 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function seeds = surfseeds(node, face)
%
% seeds=surfseeds(node,face)
%
% calculate a set of interior points with each enclosed by a closed
% component of a surface
%
% author: Qianqian Fang, <q.fang at neu.edu>
%
% input:
%   node: a list of node coordinates (nn x 3)
%   face: a surface mesh triangle list (ne x 3)
%
% output:
%   seeds: the interior points coordinates for each closed-surface
%          component
%
% -- this function is part of iso2mesh toolbox (http://iso2mesh.sf.net)
%

fc = finddisconnsurf(face(:, 1:3));
len = length(fc);
seeds = zeros(len, 3);
for i = 1:len
    seeds(i, :) = surfinterior(node, fc{i});
end