Subject: CGAL users discussion list
List archive
- From: Efi Fogel <>
- To:
- Subject: Re: [cgal-discuss] Area of union of circles
- Date: Wed, 26 Feb 2020 20:57:19 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:8y69LBQpKiqEhbvKTkzfW/4cwdpsv+yvbD5Q0YIujvd0So/mwa6zZxaN2/xhgRfzUJnB7Loc0qyK6vymCDBLuM/R+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjeu8UMhYZvJak9xgbUrnZLZu9b2X5mKVWPkhnz4cu94IRt+DlKtfI78M5AX6T6f6AmQrFdET8rLWM76tD1uBfaVQeA6WcSXWsQkhpTHgjK9wr6UYvrsiv7reVyxi+XNtDrQL8uWDSi66BrSAL0iCoCKjU0/n3bhtB2galGph+quh5xzJPOYIyNO/V+cKHSc9MUS2RCQ8hfSTBOD5imYIcTFecMJ/pUo5X/qlYIsBCwBROsBOTqyjJQiXH206w62PkhHwHB0wwvAdYOu2nTodrrOqcSUO61zK7HzTrda/Nbwjj96I3SfRAgpfGAR65/cc3UyUQ2EQ7Ok1ueqYvgPzyP1+QNtXCW4PZvVe21j24rsQZxoiKgxss0i4nJgJgVylHe+iljzoY1P9u1Q1N4b968CJZcqT2WOo9sTs4hQ2xkojs2x7wHtJKhYSQHypAqyhjCYPKdaYeI+AjsVOOJLDd4mn1lfLW/ig638Ue6y+38UtC40FdOriZYi9XMuG0B2h7X58SdRft9+UCh2TmL1w/N8O1LPUc0la/DJ54gxL4/iIYTvFzdEiPqnEj6lqybe0U+9uS16unqY6/qqoKeOoJwkg3+N74hms27AeQ2KAgOWG2b9Pyi273t/E35TrJKjvIonandq53aKsEbqbS4Aw9RyIos9xG/DzK+3NQCgXYHNE5FeA6Aj4XxJ17OL+r3DfOmj1uxkTdr3OzJPqD6ApXWNXXDi7fgfbNl60FG0gYzzNZf54hVCr4bOv7zVFXx55TlCAQkOVm03/r/E4c6kZgPXHqGRK6fKqLb91GSofk+JvGFI44TtjG6IPcs47vijGQyhEQGLpSvxoYdSGy9GqFmP1mBeiirxcwQFH8D+As4Vu3jzlOYFiVCYm67GKM66DZ8A42vCcLPR5umnaeajxq9BYBcWm1WFgWMDWvwbNfDHOwdbTqbZM5niD0NE7a7DJQw0Amn8w78xb0gJeXd/mgUtInoycNutNHUwBo9/DgxA8WG2HyWVEl1mHkJTnk4xvNRu0t4n3qN0OBWhPNVEZQH6v1IXAA1OJr0wOlzCtS0UQXEKITaAG26S8mrVGliBuk6xMUDNh4kR4eSyyvb1i/vOIc70qSRDcVtoK3Z1nn1Yc16ziSejfRzvxwdWsJKcFaeqOt/+gzUXdCblkyYk+Orcf1Z0neSpSGMym2BuEweWwl1A/2cDCIvI3DOpNG83XvsCrqnCLApKAxEkJfQJa5Da9mvhlJDFq7u
Hi Yann,
There is no out-of-the-box function in CGAL that does that.
Here is one approach.
First compute the general (circle-segment) polygon with holes.
If your resulting point set is bounded by (linear) segments only, then you can do the following:
Pick a point, say the origin, o; then, for every pair of consecutive points on the boundaries (either outer or holes) and o construct a triangle.
Sum up the signed area of all these triangles. (A clockwise triangle has negative area).
Essentially, you can do the same with circular arcs, only the computation of the area of a general triangle the boundary of which contains a circular arc is a more difficult.
(As a matter of fact such a general triangle can be self intersecting;)
Nevertheless, it is possible. If you implement a function that computes the signed area of such a general triangle, the rest is a simple loop....
Efi
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
Hi all,
Sorry to bother with this probably naive question. I want to compute the
area of the union of a set of disks. I found the example of "2D
regularized boolean set-operations", at the end of this page:
https://doc.cgal.org/latest/Boolean_set_operations_2/index.html.
Is there a way to modify this example in order to compute the area of
the union, which is (if I am right) a general polygon with holes.
thank you for your time.
regards
--
Yann
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Area of union of circles, Yann GAVET, 02/26/2020
- Re: [cgal-discuss] Area of union of circles, Efi Fogel, 02/26/2020
- Re: [cgal-discuss] Area of union of circles, Sebastien Loriot (GeometryFactory), 02/28/2020
Archive powered by MHonArc 2.6.18.