首页 > 解决方案 > [cgal]; 3D Delaunay 三角剖分

问题描述

我正在尝试进行 3D Delaunay 三角剖分,我需要获得该三角剖分的外心。我是这样做的:

  typedef CGAL::Delaunay_triangulation_3<K, Tds> Triangulation;

  // Construct the triangulation in parallel
  Triangulation T(V.begin(), V.end());
  assert(T.is_valid());


  centros.open("centros.txt");

  //With this I would obtain the circumcenters of the triangulation?:
  for (Triangulation::Finite_cells_iterator it = T.finite_cells_begin(); it != T.finite_cells_end(); it++)
  {
    cout << it->circumcenter() << " / " << T.dual(it) << endl;
  }

但是,我获得的中心距离我的初始点太远了,所以我怀疑这是否是获得球体外心的正确方法。有什么帮助吗?谢谢。

标签: cgal

解决方案


请注意,外心不一定在四面体内部。如果您有一些形状良好的元素,则尤其如此。

请参阅以下 4 点的 2D Delaunay 三角剖分和相应的外接圆: 在此处输入图像描述


推荐阅读