Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound
- Date: Fri, 27 Jul 2018 08:39:24 +0200
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:BkvExRF2LxJNjFxfCaWOh51GYnF86YWxBRYc798ds5kLTJ7zrs6wAkXT6L1XgUPTWs2DsrQY07SQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDuwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VjO+4qplShLlhj4LOyI2/WrKjsB9jL5XrBenqhdiwYDbfZuVOeJjcK3Dc9MURWlPUMhfWCNOAIyzc4QBAvEdPetatYTxu0cCoBW8CASqGejhyiVIhnjz3aAi3egvDB/J0xc6ENIVrHTUrcv6NKEPWu6zy6nI1zTDb/RK2Tzg7ITGcw4uofaJXb1ubcrR00kuGQPfgVqMtYzlOCmV1+QIv2SV8uFtUvmvi2ogqwFrozivwdsshpPMhoIR0V3E+iB5z5w0Jd28UkJ0fdmkEJ5JuiycKoB4TMQiQ2RytyY7zL0LoZi7czIRx5s8wx7QdeaLfJSP4hLmTOqePTh4i2hheL6lgBay60egx+vhXce3yFZHtjRJnsXIu3wX1BHe6tKLRuVj8ku8wzqC1w/e5vlGLE03j6bXNZEsz78qmpYOtUnOEDX6lUf2gaKQa04q4PKn6/79bbXjvpKcN5F7igX5Mqk2n8ywG+U4MgwXU2mV4+SwyaTv/UP5TbhFlPE2na7ZsJfVJcQfuKG1GRNa0oEm6xqnDjem1soXnWUfIV5bZB6Ki5LlNlLOLfziE/uznUmgnC1ryv3JJrHhB4/CLnnHkLfvZ7Z97EtcxRIozdBb4JJUELABIPXvWkPrsdzYCgQ0MwOxw+n9CdV90pkSVn6IAq+cKK/Sq0OH5vozI+mQY48YoCryK/c/6P7qlHM2hF4dfbK10psKc3C4Be9rI16ZYHrpmtcOC30Gvgs4TOzwiV2NSyRfZ3ioX/F02jZuA42vCcLPR5umnaea9Ca9BJxfIG5cWX6WFnK9Pb6JUf4XdCOfJIdFlSYFUqTpC6As0hSjqBXr5bNsMu3O62xS/cb40N9v5urP0xQ23TNxBsWZlWqKSjcnzSszWzYq0fUn8gRGwVCZ3P0l26UJR+wW3OtAV0IBDbCZyuV7D97oXQeYJ4WGTV+nRpOtBjRjF4ttke9LWF50HpCZtj6GxzCjWuZHmLmCBZhy+aXZjSCoepRNjk3e3axktGEIB8tCMWr82/x6/gnXQpHTygCXyvrseqMb0yrAsmyEyDjWsQ==
Can't you use the Mesh_3 package and set a criteria on the size of the tetrahedron? The triangulation will not be a regular triangulation
(and not a Delaunay one).
https://doc.cgal.org/latest/Mesh_3
Sebastien.
On 07/16/2018 06:36 PM, Dahn wrote:
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/
- [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound, Dahn, 07/16/2018
- Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound, Sebastien Loriot (GeometryFactory), 07/27/2018
- Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound, Dahn, 07/27/2018
- Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound, Sebastien Loriot (GeometryFactory), 07/27/2018
- Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound, Dahn, 07/27/2018
- Re: [cgal-discuss] Creating Delaunay 3d triangulation with a circumradius bound, Sebastien Loriot (GeometryFactory), 07/27/2018
Archive powered by MHonArc 2.6.18.