Subject: CGAL users discussion list
List archive
- From: Efi Fogel <>
- To:
- Subject: Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes
- Date: Sat, 8 Apr 2017 00:01:08 +0300
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:lgHheRY6gfJb9VgqTtPZEBL/LSx+4OfEezUN459isYplN5qZoMSzbnLW6fgltlLVR4KTs6sC0LuK9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQtFiT6ybL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjE7/mHZisJ+gqFGrhy/uxNy2JTbbJ2POfdkYq/RYdEXSGxcVchRTSxBBYa8YpMAAeoPPOZTsonzp1wBrRSgAQmnGeTixSFGhn/306061OshHh/C3AE7ENIOtW7brNTxNKsITe+1y6zIwCzFYvhL1zn9743IfQogofGKRb9wcMzRyVMuFwzflFmQp5blMyuJ2eQCqWeb6/BsVeW1i24orQx6vzuhxt80h4XXmo4YzkrI+CZ5zYovO9G0VU12bcSrHZdOsSyRKpF4Tdk4Q25yvSY30r0GtoC/fCgN0JknwgTQa/2Dc4SR5RLjVfqdLS52hH9qZr6znRmy8U+nyu3zUsm7zkxGoTZCktnJrnwN1hrT5dabSvZl4EutxTKC2xrQ5+xEO0w4i7fXJp07zrM/iJYfqUHDETX3mEXygq+WbEIk+u2w5uv5bLXmp5GcN4h7ig7gNqQjgcO/AeEiPQgPW2iX4/iz1Lrm/UHhWrVFkuU2krXFsJDdPckUuqG5DBVR0oo69hm/Diym38gFnXkcN1JIYwmHjojsO1HWOv/0F/a/g1K2kDdq3f/KJLPhAo+eZkXFi6rrKLZh91ZHmk101sFa/5sSC7cbIfu1VFW2r83dFhZ+Mgq6xKHsB9x5k48fQmmSGbTKDKSHulCB4qcjIvKHeZQOkDf7MfksofD03lEjnlpIUKeolbUQZ328VqBrLUSXZnXhhv8OFG4Lukw1S+m82w7KaiJae3vnB/F03To8Eo/zVYo=
On 7 April 2017 at 15:56, Ch'Gans <> wrote:
On 31 March 2017 at 05:37, Efi Fogel <> wrote:
> Check out vertical decomposition; see
> http://doc.cgal.org/latest/Minkowski_sum_2/classCGAL_1_1Polygon__vertical__decomposition__2.html.
Hi Efi,
Is it me or it is not possible to apply the vertical decomposition to
general polygon with circle/segment edges?
You are the first one to try it, and it has been developed to serve as the convex decomposition step of an implementation of the Minkowski sum operation, which supports only linear polygons, so you are probably right about this limitation.
The Polygon_vertical_decomposition_2 class uses these harcoded typedefs:
typedef CGAL::Polygon_2<Kernel, Container> Polygon_2;
typedef CGAL::Polygon_with_holes_2<Kernel, Container> Polygon_with_holes_2;
typedef CGAL::Arr_segment_traits_2<Kernel> Arr_segment_traits;
typedef CGAL::Gps_segment_traits_2<Kernel, Container, Arr_segment_traits>
Traits_2;
typedef CGAL::General_polygon_set_2<Traits_2> General_polygon_set_2;
So I have tried to re-implement the vertical decomposition using
Gps_circle_segment_traits_2, but i'm stuck with a weird problem:
To build a vertical X_monotone_curve_2 connecting two arrangement
vertices (with associated '1 root' points) I need first a 'Kernel'
supporting line, and AFAICT, i cannot build one _exactly_ out of
algebraic numbers...
Actually I am not even sure what exactly a '1 root' point is, does
that mean that it has coordinates expressed as 'a0 +a1*sqrt(r)' with
a0=0 and a1=1? If so then that is an interesting property that i might
be able to exploit.
A one-root number is actually a Square_root_extension; see http://doc.cgal.org/latest/Number_types/classCGAL_1_1Sqrt__extension.html. It's a number represented as 'a0 + a1 * sqrt(a2)', where the type of a0, a1, and a2 are template parameters. a0 doesn't have to be 0. It turns out that this number type is sufficient for the circle-segment traits. This traits supports line segments and circular arcs, where the coefficients of the line segments must be rational. A vertical segment that has an endpoint with Square_root_extension coordinates does not necessarily have rational coordinates any longer, so I guess it is impossible to do it in an exact manner.
Another idea i had (but haven't tried yet), is to calculate, using the
Kernel, the intersection point of the supporting lines associated with
the first 2 incident edges of each vertices, they should be
geometrically equivalent to the '1 root' point of the shared vertex
but expressed using the kernel number type. But that would work only
with linear segment, ... bummer!
decomp() and vertical_decomposition() can be easily modified to work
with an arrangement based on Gps_circle_segment_traits_2, the only
blocker for me ATM is the add_vertical_segment()
Yes, I think it's a real blocker.
Does anyone have tips to share on how to make the vertical
decomposition works with the Gps_circle_segment_traits_2, and maybe
could someone tell me if it is actually possible to do it in an exact
manner or not.
Thanks,
Chris
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Efi Fogel, 04/02/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Ch'Gans, 04/04/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Efi Fogel, 04/04/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Ch'Gans, 04/04/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Efi Fogel, 04/04/2017
- <Possible follow-up(s)>
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Ch'Gans, 04/07/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Efi Fogel, 04/07/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Ch'Gans, 04/08/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Efi Fogel, 04/07/2017
- Re: [cgal-discuss] Splitting (and simplifying) complex polygon with holes, Ch'Gans, 04/04/2017
Archive powered by MHonArc 2.6.18.