Subject: CGAL users discussion list
List archive
[cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt
Chronological Thread
- From: tochaf <>
- To:
- Subject: [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt
- Date: Sun, 20 Feb 2011 13:56:20 -0800 (PST)
Hi
I have a Delaunay "terrain" Triangulation
struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt;
typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;
typedef CGAL::Triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_2<Gt,Tds> Delaunay;
Then, I pretend to calculate the distance between some additional 3D points and my Delaunay Triangulation, kind of distance between points and a existing surface.
Can I use CGAL::natural_neighbor_coordinates_2 to perform that task. The latter "support" data "typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt"?
I read this http://cgal-discuss.949826.n4.nabble.com/Bug-CGAL-natural-neighbor-coordinates-2-with-CGAL-Triangulation-euclidean-traits-td2274818.html however I'm not able to realize if at least there are an answer to my topic.
After several compilation errors, i'm trying a weaker solution. Using the LOCATE function i identify where my 3D points fall in the Delaunay_triangulation_2, and then I made the interpolation myself. Unfortunately , I don't know how can I get the vertex coordinates when my 3D points coincides with a Delaunay::EDGE.
Finnaly, any suggestion to interpolate my 3D points with the Delaunay VERTEX coordinates outside the triangulation strucutre?
typedef Delaunay::Locate_type Locate_type;
typedef Delaunay::Face_handle Face_handle;
Locate_type lt;
int li;
const K::Point_3 pointLayer(4,4,1);
std::cout<<pointLayer.x()<<std::endl;
Face_handle start = Face_handle();
Face_handle c= dt.locate(pointLayer,lt,li,start);
switch (lt)
{
case Delaunay::VERTEX:{
std::cout<<"Ok, dist=0"<<std::endl;
;} break;
case Delaunay::FACE:{
typedef Gt::Triangle_2 triangle_2;
triangle_2 triangle=dt.triangle (c);
std::cout<<triangle[0]<<std::endl;
std::cout<<triangle[1]<<std::endl;
std::cout<<triangle[2]<<std::endl;
std::cout<<"Then , I interpolate such values<<std::endl;
} break;
case Delaunay::EDGE:{
std::cout<<"I dont konw how can i get the VERTEX coordiantes to interpolate my 3D point "<<std::endl;
} break;
case Delaunay::OUTSIDE_CONVEX_HULL:{std::cout<<"convex"<<std::endl;;}break;
case Delaunay::OUTSIDE_AFFINE_HULL:{std::cout<<"affine"<<std::endl;;};
}
Any help is appreciated
Antonio
View this message in context: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/20/2011
- Re: [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/21/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/21/2011
- Re: [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/21/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/21/2011
- Re: [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/22/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/22/2011
- Re: [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/22/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/22/2011
- Re: [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/22/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/22/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/22/2011
- Re: [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/22/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/21/2011
- Re: [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/21/2011
- [cgal-discuss] Re: CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, tochaf, 02/21/2011
- Re: [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt, Sebastien Loriot (GeometryFactory), 02/21/2011
Archive powered by MHonArc 2.6.16.