Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] CGAL::natural_neighbor_coordinates_2 and typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt
  • Date: Mon, 21 Feb 2011 14:58:45 +0100

tochaf wrote:
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 <../Interpolation_ref/Function_natural_neighbor_coordinates_2.html?by-user=t#Cross_link_anchor_1056> to perform that task. The latter "support" data "typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt"?
I tend to say yes. What did you try? what error message did you get? do you have a minimal example showing the problem?



I read this http://cgal-discuss.949826.n4.nabble.com/Bug-CGAL-natural-neighbor-coordinates-2-with-CGAL-Triangulation-euclidean-traits-td2274818.html <http://cgal-discuss.949826.n4.nabble.com/Bug-CGAL-natural-neighbor-coordinates-2-with-CGAL-Triangulation-euclidean-traits-td2274818.html?by-user=t> 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 Gt <http://cgal-discuss.949826.n4.nabble.com/CGAL-natural-neighbor-coordinates-2-and-typedef-CGAL-Triangulation-euclidean-traits-xy-3-K-Gt-tp3315539p3315539.html>
Sent from the cgal-discuss mailing list archive <http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.




Archive powered by MHonArc 2.6.16.

Top of Page