Subject: CGAL users discussion list
List archive
- From:
- To:
- Subject: Re: [cgal-discuss] Circular Kernel Intersection troubles
- Date: Tue, 09 Oct 2007 09:47:27 +0200
Wolfgang Aigner wrote:
To come to the problem: the intersection of arcs has as results points
with coordinates of the Root_of_2 type; how is it now possible to lay a
simple line_2 through two of such points,
If there exists a rational line containing them both then it is possible
to use a line in Cartesian<MP_Float> for instance.
This is not (/not yet?) implemented in CGAL but you can probably code
this in your program.
Ok, I'll work on this; as linear Kernel i used Cartesian<Quotient<MP_Float>> so far, should even be a larger number area; the problem is: given the two
this linear kernel is completely fine
Points in Root_of_2 type, how do I find out if there exists such a line?
well, I guess you just write ax+by+c=0 for the two points, and cancel sqrt's and solve in a,b,c (up to a constact factor).
Note that if point P is a Circular_arc_point then its x and y have the same sqrt.
I guess CGAL should propose a conversion from Root_of_2 to Core number
types. then you would be able to use Cartesian<Core::Expr> since
Core::Expr is a Field number type. However, this would not always be
very fast.
This sounds very promising, I'll have a look; when I have to work on larger
data it will probably be anyway necessary to make some compromises
The choice of kernel depends on what you want to do with your points and of their nature, not on the size of data.
Is it in any way possible, to get the intersection point(s) of a line_2
with a circluar_arc_2 yet? It is possible to cut a line_arc with a
circular_arc, so why not a line?
yes, I think Intersect_2 in the circular kernel offers this. Still, I
just checked the manual and it is not written. Did you try? It might
just be something forgotten in the manual...
I tried rather hard before; I was able to cut line_arcs and circular_arcs as said, but when choosing a line and a circular_arc, then no matching call of the function is complained; and that is a real restriction ;)
I checked in the source code. In fact there is an interal function computing this intersection, but it seems it was forgotten in the functor Intersect_2.
In case it may help, the internal piece of code is in include/CGAL/Circular_kernel_2/internal_functions_on_line_2.h
Sorry... this will be fixed in future releases...
best
Monique Teillaud
- Circular Kernel Intersection troubles, waigner, 10/08/2007
- Re: [cgal-discuss] Circular Kernel Intersection troubles, Monique . Teillaud, 10/08/2007
- Re: [cgal-discuss] Circular Kernel Intersection troubles, Wolfgang Aigner, 10/08/2007
- Re: [cgal-discuss] Circular Kernel Intersection troubles, Monique . Teillaud, 10/09/2007
- Re: [cgal-discuss] Circular Kernel Intersection troubles, Wolfgang Aigner, 10/08/2007
- Re: [cgal-discuss] Circular Kernel Intersection troubles, Monique . Teillaud, 10/08/2007
Archive powered by MHonArc 2.6.16.