Does CGAL provide spherical polygons and spherical boolean operations?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Does CGAL provide spherical polygons and spherical boolean operations?

tfmk
Hello, I have a question about CGAL's support of spherical geometry. I need
to project my 3D geometry onto a sphere (resulting in 2D spherical polygons)
and then perform 2D boolean union and difference with these polygons.

My questions are:
- Does CGAL provide a spherical polygon representation?
- Does CGAL provide boolean union/difference operations for these spherical
polygons?
- Could you provide a guess of how performant are spherical 2D boolean
operations in comparison to planar 2D boolean operations? (for example, the
time it takes to unite X spherical triangles vs. unite X planar triangles)

Thank you
tfmk



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Does CGAL provide spherical polygons and spherical boolean operations?

Sebastien Loriot (GeometryFactory)
For now nothing is available for geometry on the sphere.
In CGAL 5.1 there should be a triangulation package on the sphere
that should be released and it will include constrained triangulations
that could be used to compute Boolean operations of polygon on a sphere.

The PR should be opened in the upcoming days/weeks so you could give it
a try before the official integration if you want.

Sebastien.

On 10/20/19 1:45 AM, tfmk wrote:

> Hello, I have a question about CGAL's support of spherical geometry. I need
> to project my 3D geometry onto a sphere (resulting in 2D spherical polygons)
> and then perform 2D boolean union and difference with these polygons.
>
> My questions are:
> - Does CGAL provide a spherical polygon representation?
> - Does CGAL provide boolean union/difference operations for these spherical
> polygons?
> - Could you provide a guess of how performant are spherical 2D boolean
> operations in comparison to planar 2D boolean operations? (for example, the
> time it takes to unite X spherical triangles vs. unite X planar triangles)
>
> Thank you
> tfmk
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Does CGAL provide spherical polygons and spherical boolean operations?

tfmk
I see, thank you.

One more link that I found was:
https://doc.cgal.org/latest/Nef_S2/index.html (2D Boolean Operations on Nef
Polygons Embedded on the Sphere). It seems that this package could possibly
fulfill my requirements, am I missing some feature? I've never heard of Nef
Polygons so I'm not sure if they would be suitable. Also I'm not sure if
there is a CGAL function projecting 3D cartesian vertex onto a sphere
(converting to Nef_polyhedron::Sphere_point).

tfmk



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Does CGAL provide spherical polygons and spherical boolean operations?

Efi Fogel
Hi Tibor,

Actually, (at least theoretically) it is unofficially supported in a limited way.
It is based on, what is called, arrangement of a sphere.

First, it is not documented, so if you want to try it out, you will have to figure out certain things on your own (or ask me...)
There is a chapter on the subject in our book: Springer: CGAL Arrangements and Their Applications, and there are some papers about the subject.

Secondly, arrangement of a sphere is based on a mapping of (what we call) a rectangular parameter space to the sphere, where the top and bottom boundaries are contracted and the left and right boundaries are identified.
The right and left boundaries are mapped to a meridian that connects the two mappings of the top and bottom (contracted) boundaries,
By default, this meridian goes through (-1, 0, 0).
At this point, the code does not support curves that coincide with the meridian and isolated vertices that lie on this meridian.
If you know ahead of time that you may have such curves or points, you can re-define the arrangement template to use a different meridian.

Finally, you need to replicate some of the code in the 2D Regularized Boolean Operations package to use arrangements on the sphere (as opposed to arrangements in the plane).

The code uses linear arithmetic, so it is efficient.

If you decide to give it a try, let me know,
Efi
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/




On Mon, 21 Oct 2019 at 00:19, tfmk <[hidden email]> wrote:
I see, thank you.

One more link that I found was:
https://doc.cgal.org/latest/Nef_S2/index.html (2D Boolean Operations on Nef
Polygons Embedded on the Sphere). It seems that this package could possibly
fulfill my requirements, am I missing some feature? I've never heard of Nef
Polygons so I'm not sure if they would be suitable. Also I'm not sure if
there is a CGAL function projecting 3D cartesian vertex onto a sphere
(converting to Nef_polyhedron::Sphere_point).

tfmk



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss