Skip to content

Generic 2D/3D Periodic Triangulations#4914

Open
MaelRL wants to merge 91 commits intoCGAL:mainfrom
MaelRL:Generic_P2T2
Open

Generic 2D/3D Periodic Triangulations#4914
MaelRL wants to merge 91 commits intoCGAL:mainfrom
MaelRL:Generic_P2T2

Conversation

@MaelRL
Copy link
Copy Markdown
Member

@MaelRL MaelRL commented Aug 7, 2020

Summary of Changes

This PR adds a new type of 2D and 3D periodic triangulations whose base domain is not an iso_rectangle/cuboid, but a Voronoi face, thus greatly expanding the potential use cases.

This new class also uses the name Periodic_2_(Delaunay)_triangulation_2, and the choice between both implementations is done by looking at the domain type.

2D Periodic Triangulations are almost fully rewritten to use Bowyer-Watson rather than flips, and some other issues in periodic classes are fixed along the way (LINK TO ISSUES TODO). Also will make it almost trivial to add 2D periodic regular triangulations if somebody cares about it some day.

stash: https://gist.github.com/MaelRL/b8b4e7175f6461d8df12ae773ab980d0

TODO:

  • filter-graph to remove all unintended changes (e.g. README.md)
  • Insertion of ranges + vertex removal in P2T2
  • Generic periodic without exact constructions
  • Document + small feature
  • Fix bugs (generic_p2t2 has assertions failing on some random runs)
  • Fix second phase resulting in "twisted" periodicity
  • Structural filtering for P2T2
  • Spatial sorting for P2T2
  • Fix draw_P2T2 (basic viewer)
  • Tests
  • Everything above for P3T3

EXTRA:

  • Could implement P2RT2 for almost no effort now

TMP NOTE for exact generic w/o exact constructions:

  • Both gt can be merged as one by inserting points during phase 1 in a local triangulation with Point = <Point, Offset> and translating back the connectivity (see also triangulation removal functions).

Release Management

MaelRL and others added 30 commits March 13, 2019 13:43
- Criterion on squared circumradius will be used
- Bowyer-watson will be used
@MaelRL MaelRL removed this from the 5.2-beta milestone Sep 15, 2020
@MaelRL MaelRL modified the milestone: 5.2-beta Sep 22, 2020
@MaelRL MaelRL added this to the 5.3-beta milestone Oct 14, 2020
@sloriot sloriot modified the milestones: 5.3-beta, 5.4-beta Mar 22, 2021
@sloriot sloriot modified the milestones: 5.4-beta, 5.5-beta1 Sep 23, 2021
@MaelRL MaelRL modified the milestones: 5.5-beta, 5.6-beta Mar 28, 2022
@mglisse
Copy link
Copy Markdown
Member

mglisse commented Aug 25, 2022

Hi Mael, what is the status of this PR?
We were waiting until it is done to add a python wrapper in gudhi, since the API should be a bit different, but if it is stalled maybe we should just wrap the old P3DT3 (we have demand for the cuboid case)? Is the API in this PR roughly finalized (unless people complain in the small feature of course), so we can judge how to write our wrapper in a way that can be updated without breaking our users' code?

@MaelRL
Copy link
Copy Markdown
Member Author

MaelRL commented Aug 26, 2022

It's stalled due to lack of time, but there's no theoretical issue.

The API should be relatively stable, and pretty much the same as every other triangulations (even the current "master" periodic triangulations) for the usual functionalities such as insert, remove, move, number_of_X etc.

So far this PR is work only on P2T2 and is still missing quite a bit to finish. And then everything needs to be mirrored into P3T3...

@mglisse
Copy link
Copy Markdown
Member

mglisse commented Aug 26, 2022

The API should be relatively stable, and pretty much the same as every other triangulations (even the current "master" periodic triangulations) for the usual functionalities such as insert, remove, move, number_of_X etc.

Yes, the interesting part is specifying the domain, the need sometimes to call convert_to_1_sheeted_covering or deal with the redundancy, etc.

Thank you for the information, we will probably go ahead without waiting then.

Good luck with finishing the PR when you find the time.

@MaelRL
Copy link
Copy Markdown
Member Author

MaelRL commented Aug 27, 2022

For the domains, nothing will (should) change for the flat torus.

It is also backward compatible: I replace e.g. Periodic_2_triangulation_2 by a more generic class that is templated by the domain, and by default the domain is the flat torus.

@MaelRL MaelRL modified the milestones: 5.6-beta, 5.7-beta Mar 23, 2023
@janetournois janetournois modified the milestones: 6.0-beta, 6.1-beta May 16, 2024
@MaelRL MaelRL modified the milestones: 6.1-beta, 6.2-beta Mar 17, 2025
@sloriot sloriot changed the base branch from master to main September 16, 2025 19:20
@MaelRL MaelRL modified the milestones: 6.2-beta, 6.3-beta Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

5 participants