Remove lines of specified length from triangulation
5 次查看(过去 30 天)
显示 更早的评论
The following code generates square:
[X,Y]=meshgrid(0:0.5:1);
points=[X(:),Y(:)];
figure('Name','Point set','NumberTitle','off')
scatter(points(:,1),points(:,2),'marker','o','MarkerEdgeColor',[0 0 1],'LineWidth',2)
xlabel('x','FontSize',13);
ylabel('y','FontSize',13);
title('Point set','FontSize',13)
axis square
Then I triangulate these points:
DT=delaunay(points);
figure('Name','Trangulation','NumberTitle','off')
patch('Faces',DT,'Vertices',points,'FaceColor',[1 0.5 0],'EdgeColor',[0 0 1]);
xlabel('x','FontSize',13);
ylabel('y','FontSize',13);
title('Trangulation','FontSize',13)
Triangulation generates diagonal lines that depend on the width and height of the square grid element.
I need to remove these lines and leave the rest. And in general, I would like to understand the principle of how to remove from the triangulation lines that exceed or vice versa are less than some given value.
I was inspired by this code, but whole simplices are removed, and I need to remove only lines:
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Triangulation Representation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!