Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound

Subject: CGAL users discussion list

List archive

[cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound


Chronological Thread 
  • From: Dahn <>
  • To:
  • Subject: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound
  • Date: Mon, 16 Jul 2018 09:36:30 -0700 (MST)
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
  • Ironport-phdr: 9a23:9KrPVxaOj+JcISsULU7Qp3z/LSx+4OfEezUN459isYplN5qZocW8bnLW6fgltlLVR4KTs6sC17KI9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa8bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjA38G/ZlM9+gr9Urx29qBJy2JLUbYOJOPZiYq/RYc0WSGxcVchRTSxBBYa8YpMBAeUbPeZYqZT2qlwTohSkBQmsAvnvxSVWiX/y3Kw3yOshEQTc0wwhG9ICqmjbrNLwNKoLV+2+0afGzTLGb/xM2Df97pDFchY7rv6XRr1wddTexVMzGAPCi1Wdr5HuMTCN1ukVrmSW7vRsWfixh2MnpQx9uCWjy8kih4XThI8Z1FbJ/jhjzokvP923Ukt7bMakEJROsyGaMJN7QsUtTm1yviY10KYJtoW/fCcU0pgo2xnfa/mff4iJ5BLsSvqRLC9liH9kZr6znQi+/Eiux+HmS8W53lhHojBHn9XSrnwN0gbc6smDSvtz5Eeh3jOP2hjO5e5eIUA0k7DbJIQ/zb40l5seqkvDHirsl0X3iK+abFkr+u+t6+j/eLXpuoecN5NoigH5KqkhhsO/Dv48MgQXQmeb+P+826H+/U3iW7VHleY2k6ncsJDCP8sXvK+5AwlP0oYi8RmzFTmm0M5L1UUAeVlKcRbCg4nyMEzVO9j5C+2+ihKiimRF3ffDa5HoApOFenTKkLH7dLt5+WZTzQMyyZZU4JcCWeJJG+76RkKk7I+QNRQ+KQHhm7+2WuU47ZsXXCe0OoHcNarTtVGS4ed2eruDYYYUvHD2LP13vKey3098okcUeOyS5bVScGqxR600LECQYH6qidAEQz9T41gOCdfygVjHagZ9Ina/W6Vlu2M9VMSgBI3JQo3ri7uEjn62

I'd like to create a 3d Delaunay triangulation with a pre-specified
circumradius bound. At first I thought a dense enough regular grid is a good
solution, but due to either the perturbation of the grid points or floating
point arithmetic (which is it?) this creates very large tetrahedra.

Say I want to limit the circumradius to 0.1. With 6000 points, most
tetrahedra indeed have a circumradius below 0.1. However, a few will have
circumradii as large as 3. Increasing the number of points won't help, as it
will only increase the size and number of the tetrahedra with large
circumradii.

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/point_generators_3.h>
#include <vector>
#include <iostream>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_3 Point;
typedef CGAL::Creator_uniform_3<double, Point> Creator;
typedef std::vector<Point> Vector;
typedef CGAL::Delaunay_triangulation_3<K> Dt;
typedef Dt::Tetrahedron Tetrahedron;

double circumradius( const Tetrahedron& t) {
return
CGAL::sqrt(CGAL::squared_distance(CGAL::circumcenter(t),t.vertex(0)));
}


int main(){
int npts = 6000;
//// Create a vector of random points
Vector points;
CGAL::points_on_cube_grid_3( 1, npts, std::back_inserter(points),
Creator()
);

//// Create a Delaunay triangulation from those points
Dt T;
T.insert(points.begin(),points.end());

/// Write out tetrahedron whose circumradii are too large
for (Dt::Finite_cells_iterator cell = T.finite_cells_begin(); cell !=
T.finite_cells_end(); ++cell) {
double circum = circumradius(T.tetrahedron(cell));
if (circum > 0.1) {std::cout << circum << std::endl;}

}
}



Thank you for any help!



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/



Archive powered by MHonArc 2.6.18.

Top of Page