문제
1000 개의 Unifomally Random Points에서 Delaunay 삼각 측량의 결과는 전혀 보이지 않습니다 (이미지 참조). 어떤 포인트는 비정상적으로 많은 수의 삼각형에 속하는 것 같습니다.
세부 사항 : CGAL 3.4, Windows XP
이것은 내가 사용한 유형입니다.
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_2<K> Triangulation;
typedef Triangulation::Point Point;
디스플레이는 다음과 같습니다.
delaunay_c::Triangulation::Edge_iterator eit = T.edges_begin();
delaunay_c::Triangulation::Edge_iterator end = T.edges_end();
for(;eit != end; ++eit)
{
delaunay_c::Triangulation::Segment s = T.segment(eit);
line.m_a = delaunay_c::convert(s.source());
line.m_b = delaunay_c::convert(s.target());
line.draw();
}
함수는 단순히 CGAL 지점에서 다른 지점 형식으로 변환합니다.
편집 : 선택한 답변에 따라 삼각 측량을 Delaunay_triangulation으로 변경합니다.
typedef CGAL::Delaunay_triangulation_2<K> Triangulation;
그리고 그것은 주었다 :
해결책
Delaunay 삼각 측량보다는 정규를 사용하고 있습니까?
당신은 다음을 사용하고 있습니까?
CGAL::Delaunay_triangulation_2<Traits,Tds>
제휴하지 않습니다 StackOverflow