Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Choosing a representative in a 3D Periodic Delaunay Tessellation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Choosing a representative in a 3D Periodic Delaunay Tessellation


Chronological Thread 
  • From: Mael <>
  • To:
  • Subject: Re: [cgal-discuss] Choosing a representative in a 3D Periodic Delaunay Tessellation
  • Date: Mon, 18 Feb 2019 09:38:06 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:+pgTbxbpupdAiWp6RgL33yX/LSx+4OfEezUN459isYplN5qZr8+6bnLW6fgltlLVR4KTs6sC17KG9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCa+bL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjAk7m/XhMx+gqFVrh2vqBNwwZLbbZqPO/ZiZK7QZ88WSGRDU8tXSidPApm8b4wKD+cZOuhXtZfyp18Tpha5AAmjHv3gyjtSin/s2q06zusgHh/C3AA6G9IBqm/bo87rO6oJXuC60q7IzTDdYPNKwzf86IbIfQo9rvGQWrJwa8rQxVMzGAPCi1WdsIroNC6b2OQKtmiU9etgVeS3hm4hsQ5+uSOgxsMyhYXTmo0VzVXE+CNky4g2Pd21UEF2bN++HJdNqy2XN5F6T8EiTm1ypio3y6UKtJqncCQQy5kqxgTTZv+bf4SS/B7vSfudLDFlj3x/Yr2/nQy98U24x+38SMa01FFKozJGn9XWs3AN0AHf58qDR/dn+0euwzeP1wTK5uFDPEA0ibDXK5k/wr4wjJYTt1rMHjPulEX3iq+ZaFkk9/Cn5unmeLnqu4OQOo9uhgz8MqkigNKzDOUgPggLRWeb+OC81LP5/U3+RbVHlvg2nbPHv5DeP8gbvKm5AxJa04k97xazFTOm384DknYcMl1IYx2HgJbuO1HLPv/4Ee2/glSikDhx2//GIrrhAo/NL3TZjLjherN951ZGyAUv1dBf+45UCrYZLf3vVU/+rtjYAgYkPAy12OboFMh91pgFWW+UGa+YMKbSsUeS6e41IumMYpUVuDfnJPQ/6f7ulyxxpVhIdqag2d4baWuzA+99C0Sfe3vlxNkbQkkQuQ9raeXnjBXWVDdeYzCoWL8s6zV9DIusB4rrSY2qhbGdxja1F5ZKYXpXTFuLFCG7JM2/R/4QZXfKcYdamTseWO35Et5z5VSVrAb/joFfAK/R8ywcu4jk0YIsteLekhQ/6SZlAc2Wz2aXXid/mWZaH2ZqjpA6mlR0zxK46YY9m+ZRT4UB6P5OVwomL4/SxudmDMrjHAnGe4XREQv0cpCdGTg0C+kJ7ZoObkJ6QYvw3lbG2HP1UvkQnr2PQZsp7uTbwXi3IcthmS7L

Hello,

On 09/02/2019 04:52, Michael Klatt wrote:
Dear Mael,

Thanks! One of my algorithms is implemented and running. Unfortunately, for
the next one I still have some questions.
In particular, I am not sure whether I have understood the uniqueness or
non-uniqueness of the handles correctly.
Handles can be thought of as pointers, so each cell has its own address and thus its own unique handle, even if the cell is just a periodic copy of a canonical cell.
What is a unique identifier of each cell (where we do not distinguish
periodic copies)?

There is no such identifier that would be the same for each cell of the triangulation that correspond to the same cell periodically. However, you could create a "signature" function for the cell, which would extract (and order) from its vertices [v0, ..., v3] the corresponding canonical vertices [canonical_v0, ..., canonical_v3], using functions described in the previous emails. This would be unique per cell, regardless of whichever periodic copy you're looking at.

Another way: if you look into the code of the class Periodic_3_triangulation_3, you will find two maps that are members of the class: "virtual_vertices" and "virtual_vertices_reverse", these enable to find the handle of the canonical vertex from any vertex (and reversely). You could build the same thing for cells, noting that the canonical cell is defined as the cell whose vertices have smallest positive offset, e.g.:

c = [vh_0, vh_1, vh_2, vh_3] = [{canon_vh_0, offset(1,1,1)}, {canon_vh_1, offset(1,0,0)}, {canon_vh_2, offset(1,0,1)}, {canon_vh_3, offset(2,1,1)}]

is not canonical, its canonical representative is:

c' = [vh_0', vh_1', vh_2', vh_3'] = [{canon_vh_0, offset(0,1,1)}, {canon_vh_1, offset(0,0,0)}, {canon_vh_2, offset(0,0,1)}, {canon_vh_3, offset(1,1,1)}]

You can check the function called 'is_canonical()' in the class 'Periodic_3_triangulation_tetrahedron_iterator_3'.

How can I iterate over unique cells (in the sense of the
Iterator_type=UNIQUE) so that I can analyze some (arbitrary) representative
tetrahedron and assign information to the unique identifier of the cell?
You can loop over all the cells, and check if it is canonical, using the definition above. Or just build the correspondence map(s) between canonical and non-canonical cells, which seems that it would be all around useful for you.
Next, I would like to iterate over unique facets and get the two adjacent
cells, that is, their unique identifier as well as the relative offset of
for example the center of mass of the representatives that form that facet?

Important note: a facet 'f' is just a pair of a cell handle and an index, which is the index of the fourth vertex opposite of the facet in the cell handle. Therefore, do note that if c1, and c2 are adjacent, there are two different facets (one seen from c1, one seen from c2).

This being said, you can just loop over all your facets (using facets_begin(), facets_end()), and use your unique cell map (or is_canonical(ch)) to check if the cell f.first is unique. If you don't want to see the facet from each side, you can filter one of the two facets by ignoring a facet 'f' if the handle of c1 == f.first is larger than that of c2 == f.first->neighbor(f.second)  (using notations above for c1 and c2).

I am not sure I understand what you mean with 'relative offset of the center of mass': offset with respect to what? If it is the original domain, then you can use the function "construct_periodic_point()" which gives you the canonical point and the offset. If you mean with respect to the facet (i.e. the cell) then use the same function and combine offsets.

Best,
Mael


It will be a great help to me, if there is a convenient solution to these
problems.
Thank you very much!

Best regards,

Michael




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




Archive powered by MHonArc 2.6.18.

Top of Page