Elena
Elena

Reputation: 37

[cgal]; 3D Delaunay Triangulation

I'm trying to do a 3D Delaunay Triangulation and I need to obtain the circumcenters of this triangulation. I've done it this way:

  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;
  }

However, I obtain centers way too far from my initial points, so I'm doubting if this is the correct way of obtainint the circumcenters of the spheres. Any help? Thanks.

Upvotes: 0

Views: 344

Answers (1)

sloriot
sloriot

Reputation: 6253

Note that the circumcenter is not necessarily inside the tetrahedron. This is especially true if you have some elements that are well shaped.

See the following 2D Delaunay Triangulation of 4 points and the corresponding circumcircles: enter image description here

Upvotes: 1

Related Questions