Subject: CGAL users discussion list
List archive
- From: Tom Dreyfus <>
- To:
- Subject: [cgal-discuss] bug: circumcenter with Regular_triangulation_3
- Date: Thu, 7 Feb 2013 18:07:34 +0100 (CET)
Hello,
The methods Regular_triangulation_3::dual(Cell_handle) and Cell::circumcenter(void) do not return the same point.
I join a short example.
Tom.
4The methods Regular_triangulation_3::dual(Cell_handle) and Cell::circumcenter(void) do not return the same point.
I join a short example.
Tom.
25.119 -0.797 -1.881 0 3.27
25.715 0.493 -1.356 0 3.16
24.964 1.396 -0.971 0 2.8
24.061 -1.777 -4.067 0 3.16
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Regular_triangulation_euclidean_traits_3.h> #include <CGAL/Regular_triangulation_3.h> #include <CGAL/Polygon_2.h> #include <CGAL/Projection_traits_xy_3.h> #include <iostream> #include <fstream> typedef CGAL::Exact_predicates_exact_constructions_kernel K; typedef CGAL::Regular_triangulation_euclidean_traits_3<K> Gt; typedef CGAL::Regular_triangulation_3<Gt> RT; typedef CGAL::Projection_traits_xy_3<Gt> Polygon_traits; typedef CGAL::Polygon_2<Polygon_traits> Polygon; typedef Gt::Point_3 Point_3; typedef Gt::FT FT; typedef Gt::Weighted_point Weighted_point; int main() { RT R; std::ifstream in("bug.txt"); unsigned n; in >> n; Point_3 p; FT r; for(unsigned i = 0; i < n; i++) { in >> p >> r; R.insert(Weighted_point(p, r*r)); } //check that each Voronoi face is convex: for(RT::Finite_cells_iterator it = R.finite_cells_begin(); it != R.finite_cells_end(); it++) std::cout << it->circumcenter() << " / " << R.dual(it) << std::endl; return 0; }
cmake_minimum_required(VERSION 2.4.5) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) endif() find_package(CGAL) if ( CGAL_FOUND ) include( ${CGAL_USE_FILE} ) add_executable(bug.exe bug.cpp) else() message(STATUS "This program requires the CGAL library, and will not be compiled.") endif()
- [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Tom Dreyfus, 02/07/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Fernando de Goes, 02/07/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Tom Dreyfus, 02/08/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Sebastien Loriot (GeometryFactory), 02/08/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Monique Teillaud, 02/08/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Sebastien Loriot (GeometryFactory), 02/08/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Tom Dreyfus, 02/08/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Nico Kruithof, 02/07/2013
- Re: [cgal-discuss] bug: circumcenter with Regular_triangulation_3, Fernando de Goes, 02/07/2013
Archive powered by MHonArc 2.6.18.