Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Segment Voronoi Diagram to Conics Arc conversion problems

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Segment Voronoi Diagram to Conics Arc conversion problems


Chronological Thread 
  • From: Myirci <>
  • To: "" <>
  • Subject: [cgal-discuss] Re: Segment Voronoi Diagram to Conics Arc conversion problems
  • Date: Mon, 27 May 2013 10:58:14 +0200

Hi again,

For converting SDG output to 2D_Arrangements I used the Bézier arrangements traits using the facts that each parabola segment is a quadratic Bézier curve and each line segment is a linear Bézier curve. This works fine for me.

Best wishes 

Murat


On Tue, Apr 9, 2013 at 11:21 PM, Myirci <> wrote:

Hi Michael,
Thank you for the reply.
I already tested the the complex construction method both with exact predicates exact constructions and e.c.e.p. with sqrt kernels but unfortunately they did not work. I attached the output and the code in the previous emails.The reason why complex construction method fails  is sometimes cgal can not find an intersection point between a parabola segment and a line segment.

I will try the algebraic segments traits as soon as possible and share the results, but it will be after 2 weeks when I return to lab from vacation.

Best wishes

Murat



On Tuesday, April 9, 2013, Michael Hemmer <> wrote:
> Hi Myirci,
>
> Panos already gave the right hint, the problem is that things are not done in an exact way. Which is why your endpoints become invalid as there are not exactly where they are supposed to be. (exactly on the curve)
>
> You must be aware that intersection points of conics are (usually) not rational.
> Thus converting them to Rationals can not be exact.
>
> What you must do is to use the most complex constructor that uses the three conics. The first conic is the one that defines the arc. And the other two are used to define the end points by intersecting the first conic. However, I have to admit that this is not a good interface as it is not sure that one will always select the right intersection point since the interface selects them by giving an approximation. If two points are close this won't work.
>
> You may consider using the algebraic segment traits which will be as fast as the conic traits.
> Here you define first the conic by giving a bivariate polynomial, from which you take the correct x monotone arc.
> Then you define the correct x coordinate of a point using algebraic numbers (be careful not to define it by conversion but by choosing the correct root of the resultant of the two involved conics.)
> Then you define the point using the arc end the point.
>
> I agree that this is complex, but this is due to the fact that these classes where developed independently and we do not have conversion tools available.
>
>
> Michael
>  
>
>
>
>
>
>
>
>
>
>
> On Mon, Apr 8, 2013 at 4:16 PM, Myirci <> wrote:
>
> I'm sorry I forgot to attach the files for the test I did with the Exact_predicates_exact_constructions_kernel_with_sqrt. Here are the files.
> Best wishes
> Murat
>
> On Mon, Apr 8, 2013 at 4:13 PM, Myirci <> wrote:
>
> Thank you Panagiotis but the same problems arises when I change the kernel to the Exact_predicates_exact_constructions_kernel_with_sqrt (which uses CORE::Expr as the exact number type). SDG also uses the CORE::Expr as Algebraic number type. 
> Here the problem with the test-1 (using the conics arc API without approximated source and target points) may be caused by the number type conversion form Algebraic (CORE::Expr) to Rational (CORE::BigRat). This conversion is required because Conics Arc API only accepts Rational numbers.  On the other hand, I don't have any idea why test-2 fails, since I'm giving pretty good approximated points to the source and targets. Either I'm doing something wrong or this may be bug.
> Best wishes 
> Murat
>
>
>  I'm also attaching the code for this kernel and the results I obtained.
>
> On Mon, Apr 8, 2013 at 11:05 AM, Panagiotis Cheilaris <> wrote:
>
> On Sat 2013-04-06 at 03:32:54 +0200, Myirci wrote:
>> Dear all CGAL Users,
>>
>> I'm using CGAL Segment Delaunay Graph(SDG) package for generating the
>> segment voronoi diagram for polygon with holes. Then, in the second step
>> I'd like to convert the SDG output (after filtering out the degenerate and
>> outsider curves) to conics arcs. However, I've some problems with the
>> second step which I would like to share with you. I attached a simplified
>> code (as possible as I can) and my outputs to discuss the conversion I
>> mentioned.  Moreover I also attached the Parabola_segment_2.h header file
>> which I needed to modify slightly just to get access the source, target and
>> origin points of the parabola segment. In the code, I set up two tests for
>> the step-2.
>
> I am not an expert in the number types of CGAL, but from your code
> it seems that for the endpoints of the parabolic segments you do not
> use a number type that can support exact computations with square roots.
> I think this kind of number type might be necessary to have
> exactness (think of a parabola and a line intersecting at such an
> endpoint). The SDG package uses square roots internally.
>
> Best,
> Panos
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsu
>
> --
>
> Dr. Michael Hemmer
>
> Tel.     +972-3-6406114
> Fax.    +972-3-6405387
>  
> Email:
> --------------------------------------------------------------------

--
Murat Yirci




--
Murat Yirci


  • [cgal-discuss] Re: Segment Voronoi Diagram to Conics Arc conversion problems, Myirci, 05/27/2013

Archive powered by MHonArc 2.6.18.

Top of Page