Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] a question about some basic algorithms
- Date: Mon, 28 Oct 2019 10:04:40 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:tO5LphFfnWuta6IoAHX25p1GYnF86YWxBRYc798ds5kLTJ7yp8mwAkXT6L1XgUPTWs2DsrQY0rGQ4vCrADZeqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba58IRmsqQjctcYajZZ8Jqsw1xDEvmZGd+NKyG1yOFmdhQz85sC+/J5i9yRfpfcs/NNeXKv5Yqo1U6VWACwpPG4p6sLrswLDTRaU6XsHTmoWiBtIDBPb4xz8Q5z8rzH1tut52CmdIM32UbU5Uims4qt3VBPljjoMOjgk+2/Vl8NwlrpWrg+/qRxxw4DaY4+bO/RxcazfYdwUSnFMXtpSWiFbHo+wc4UCAugHMO1Fr4f9vVwOrR6mCAWiGe3g1CRHiWXt3a0m0uQuDwfG1xEmEdIJqnTUrdL1NLsPWuyxzafH0zLDb/ZI1jfh8ojJchAvruuQUrJsdsrR00kuGwbLgl6NroHlJDeV1uMXs2ia6OpgSfiji2sjqwxqrTivw90jiojNho4P1l/E8iB5zZ8zKNalRkB7ZtukH4FRtyGcL4Z5XswiTHtsuCogzb0Go5G7cS4Xw5ok3x7Sc+KLf5SM7x75V+ucIS10iGx7dL6inRq//kmtxvXiWsauzFpGsy9IncfCu30C0hHc9MaHR/ph8UqkxDqC2Bvc5v1BLE8qlqfUNZAsz7s0m5UJrEjPAyr7l1jrgKKZakkp//ak5/r7brr9oJKXKpV6hRvkMqs0n8yyGeQ4PRYKX2ic4em80afs/Uz9QLlTgPw2iLTVvInUJckUp6O1GQBV0oEk6xawCzepzs4UkmUALFJAYB6Hjo7pNE/SIP3gE/uzn1ChnC1oyv3GJLHtHIvBImXZnLrufLtx80tcxxAyzdBb6ZJUELYBIPfrV0/qsNzYCQU5Mw2zw+b7Etl904ceVHmAAq+cKqzSsFuI6vgzLOmLYY8ZoCz9JOQ95/7ykX85nkcQcrWm3ZQNbHC0B+lpI0SCYXXwn9cBCnwKsxElTO3qjV2CSSRca2yzX6I6/DE7CZipAZ3NRoC30/S923KwEZRSI2xHEVuRCmzAdoOeWv5KZjjBDNVml2lObrWrQpQ91Byo/Cv90btgMqKU1SAfsJ//zslb7ubPkgsjtHY8W9+Z1HuMSH0ym2cgSDo/3aQ5qkt4nATQmZNkiuBVQIQAr8hCVR03YMaFnr5KTuvqUweERe+nDVOvQ9GoGzY0F4tjzNoHYkI7ENKn3EmagniaRoQNnrnOP6Qat6LR23+repR4wnfCkbY71hwoHpUJOmqhiapysQPUAtyRyhnLp+ORba0ZmRX12iKb12PX5RNXVQdxVePOWnVNPkY=
There might be a simpler and smarter way to do it but using the dD triangulation package:
https://doc.cgal.org/latest/Triangulation
You should be able to know if a point location using the locate function:
https://doc.cgal.org/latest/Triangulation/classCGAL_1_1Triangulation.html#af9ea0ceb6cc5c814e4ed63738396a6b6
For the distance to the convex hull, I would first build the
triangulation, extract the vertices on the convex hull
(which are the set of vertices incident to the infinite vertex)
and build a triangulation out of those vertices.
Then doing locate queries, you will
Access the infinite_vertex() using:
https://doc.cgal.org/latest/Triangulation/classCGAL_1_1Triangulation.html#a44e3585e1b8fa31b718310a3f32a92af
Access dimension 1 incident cells (edges):
https://doc.cgal.org/latest/Triangulation/classTriangulationDataStructure.html#a9700c5ae4a6a2af65b002fb1057d47fa
Use the range of vertices in the cells (vertices_begin(), vertices_end()) + to get the vertex of the edge that is not the infinite one:
https://doc.cgal.org/latest/Triangulation/classTriangulationDataStructure_1_1FullCell.html
Note that Delaunay_triangulation inherits from Triangulation, that itself inherits from the TriangulationDataStructure. The
doc of some methods are in the Triangulation or TriangulationDataStructure doc only.
Sebastien.
On 10/25/19 5:10 PM, Valdes, Julio wrote:
Dear Sirs:
First of all thank you for the formidable effort that represents the work
around the CGAL library.
I am not an expert in computational geometry, but I need to use some basic
algorithms and I have not been able to find my way through the documentation.
Please excuse me if my questions are too trivial for you.
The algorithms that I am interested in are related to convex hulls (in d > 3
dimensions):
1) distance from a point to a convex hull.
2) whether a point is inside/outside with respect to a given convex hull.
I would appreciate if you could direct me to the algorithms in CGAL that
approach the aforementioned problems.
In case that there would not be available algorithms for the general case,
references to lower dimension versions would be also helpful.
Any additional comments that you could provide, given your expertise in the
domain would be greatly appreciated.
Sincerely
Julio J. Valdés
National Research Council Canada | Conseil
National de Recherches Canada
Digital Technologies Research Centre | Centre
de Recherche en Technologies Numériques
Data Science for Complex Systems Group | Science des
Données pour les Systèmes Complexes
M-50, 1200 Montreal Road, Ottawa, Ontario K1A 0R6 | M-50, 1200 chemin
Montréal, Ottawa, Ontario K1A 0R6
Canada
| Canada
tel/tél: (1)613-993-0257
- [cgal-discuss] a question about some basic algorithms, Valdes, Julio, 10/25/2019
- Re: [cgal-discuss] a question about some basic algorithms, Sebastien Loriot (GeometryFactory), 10/28/2019
- RE: [cgal-discuss] a question about some basic algorithms, Valdes, Julio, 10/30/2019
- Re: [cgal-discuss] a question about some basic algorithms, Sebastien Loriot (GeometryFactory), 10/28/2019
Archive powered by MHonArc 2.6.18.