You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
573 B

%--------------------------
% @Author: Jingqiao Hu
% @Date: 2021-12-27 20:26:33
% @LastEditTime: 2022-01-28 17:56:16
%--------------------------
function conn_list = dt_connection(seeds)
DT = delaunayTriangulation(seeds);
tet_mesh = DT.ConnectivityList;
npnts = size(seeds, 1);
conn_list = cell(npnts, 1);
% figure; triplot(DT); hold on;
parfor i = 1 : npnts
[r, ~] = find(tet_mesh == i);
idx1 = tet_mesh(r, :);
idx2 = unique(idx1(:));
% remove i
conn_list{i} = idx2(idx2 ~= i);
end
end