Replies: 13 comments
-
Aahh, I guess there must be something like |
Beta Was this translation helpful? Give feedback.
-
I don't find :-( Also tried |
Beta Was this translation helpful? Give feedback.
-
Ok it's |
Beta Was this translation helpful? Give feedback.
-
Here is the picture I obtain with the code below: The two black points are the dual points of the two faces. Am I correct to believe that "the" hyperbolic segment joining these two points is the one that separates the blue circle and the green circle, in the sense that this is the locus of equidistant points to these two circles? How to get this hyperbolic segment? Or did I understand nothing? :-( Other question: why the dual points are weighted? #include <Rcpp.h>
#define CGAL_EIGEN3_ENABLED 1
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Apollonius_graph_2.h>
#include <CGAL/Apollonius_site_2.h>
#include <CGAL/Apollonius_graph_traits_2.h>
//#include <CGAL/Triangulation_2.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point2;
typedef CGAL::Apollonius_graph_traits_2<K> Traits;
typedef CGAL::Apollonius_graph_2<Traits> ApolloniusGraph;
typedef ApolloniusGraph::Site_2 Site2;
//typedef ApolloniusGraph::Triangulation_data_structure Tds;
//typedef CGAL::Triangulation_2<K,Tds> Triangulation;
//typedef Triangulation::Vertex_handle Vertex_handle;
// [[Rcpp::export]]
void test() {
Point2 p1(0, 0);
Point2 p2(4, 0);
Point2 p3(2, 4);
Point2 p4(7, 4);
Site2 s1(p1, 1);
Site2 s2(p2, 1.5);
Site2 s3(p3, 1);
Site2 s4(p4, 1);
ApolloniusGraph ag;
ag.insert(s1);
ag.insert(s2);
ag.insert(s3);
ag.insert(s4);
// validate the Apollonius graph
assert(ag.is_valid(true, 1));
for(auto f = ag.finite_faces_begin(); f < ag.finite_faces_end(); f++) {
Rcpp::Rcout << ag.dual(f) << "\n";
}
} |
Beta Was this translation helpful? Give feedback.
-
I've checked that the two black points are indeed equidistant to the two circles. Good point. But where is the center of the hyperbola? |
Beta Was this translation helpful? Give feedback.
-
Ok, I get the hyperbolic segment but in order to get it I have to numerically solve an equation. |
Beta Was this translation helpful? Give feedback.
-
Question: here it was clear (visible) that the hyperbolic segment separates the blue circle and the green circle. But given a hyperbolic edge, how to formally know which are the two circles it separates? |
Beta Was this translation helpful? Give feedback.
-
No idea? Here is another example for which I "guessed" the structure of the tessellation: But for something more complex I don't know how I could do. |
Beta Was this translation helpful? Give feedback.
-
Ok, I think I will manage. I use faces with info and |
Beta Was this translation helpful? Give feedback.
-
Sorry to bother, but is it possible to use vertices with info for Apollonius graphs ? I have typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef K::Point_2 Point2;
typedef CGAL::Apollonius_graph_traits_2<K> Traits;
typedef CGAL::Apollonius_graph_vertex_base_2<Traits,false> Vb;
typedef CGAL::Triangulation_face_base_with_info_2<int,K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
typedef CGAL::Apollonius_graph_2<Traits, Tds> ApolloniusGraph;
typedef ApolloniusGraph::Site_2 Site2; I don't see where I can put |
Beta Was this translation helpful? Give feedback.
-
Is it possible that the infinite face has a vertex or is it a bug? I have a situation where |
Beta Was this translation helpful? Give feedback.
-
Ok, neat. But this would be easier with |
Beta Was this translation helpful? Give feedback.
-
I've found: typedef CGAL::Triangulation_vertex_base_with_info_2<int, K> Vbi2;
typedef CGAL::Apollonius_graph_vertex_base_2<Traits, false, Vbi2> Vb; This third template parameter is not documented (I've found by looking at the source code). |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying the Apollonius graphs. Below is my first program. I expected to print the vertices of the graph with
but that prints nothing except some empty new lines. I also tried
(*v).x()
but my editor indicates that there's no memberx
in the vertex type.Beta Was this translation helpful? Give feedback.
All reactions