Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Construct line through two Circular_arc_point_2's

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Construct line through two Circular_arc_point_2's


Chronological Thread 
  • From: Efi Fogel <>
  • To:
  • Subject: Re: [cgal-discuss] Construct line through two Circular_arc_point_2's
  • Date: Wed, 15 Aug 2012 10:53:12 +0300

Hi Alex,

Naturally, the answer depends on the intended usage of the resulting segment.
If the segment must go exactly through the 2 points, then you must use a kernel that supports segments defined by points with coordinates of type Root_of_2.
This is unfortunate, because in comparison with a rational kernel, for example, it is slower.

Given a point on a circle, one approximation typically used is finding a near by point on the circle, but with rational coordinates, so at least the approximate point is still on the circle; see, e.g., rational_rotation_approximation of CGAL.

Efi

On Wed, Aug 15, 2012 at 7:50 AM, Alex Tsui <> wrote:
Hi,

I am using Exact_circular_kernel_2 and I would like to construct a line segment that exactly passes through two Circular_arc_point_2's. It looks like I have a choice between a CircularKernel::Segment_2 or a CircularKernel::Line_arc_2. However, Segment_2's coordinate type (FT) doesn't match the arc point's coordinate type (Root_of_2). It also seems that you can't construct a Line_arc_2 given just two arc points - you also need a Line_2 that contains both of the arc points. But like the Segment_2, Line_2 uses FT coordinates and I'm not sure how to construct one that contains both arc points. How should I do this?

Thanks,

--Alex



--
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/






Archive powered by MHonArc 2.6.18.

Top of Page