Skip to content

Triangulation_3: Store subdeterminant for in_sphere predicate#9495

Draft
afabri wants to merge 10 commits into
CGAL:mainfrom
afabri:Triangulation-subderminant-GF
Draft

Triangulation_3: Store subdeterminant for in_sphere predicate#9495
afabri wants to merge 10 commits into
CGAL:mainfrom
afabri:Triangulation-subderminant-GF

Conversation

@afabri

@afabri afabri commented May 24, 2026

Copy link
Copy Markdown
Member

Summary of Changes

Following [Marot &al] we store four sub determinants in each cell to accelerate the in sphere test needed for the Delaunay property.

This is only a draft pull request as currently I store the four sub determinants as info() and the code is in an #ifdef macro. We should test at compile time for the presence of a member function sub_determinants() to conditionally activate code.

Todo

  • Nicer design than #ifdef
  • We probably need another epsilon for the static filter.
  • Benchmarking
  • See if we can do something better for infinite cells
  • Documentation

Release Management

  • Affected package(s): Triangulation_3
  • Feature/Small Feature (if any):
  • Link to compiled documentation (obligatory for small feature) wrong link name to be changed
  • License and copyright ownership: unchanged

@afabri afabri requested a review from MaelRL May 24, 2026 16:55
@afabri afabri self-assigned this May 24, 2026
@afabri afabri added this to the 6.3-beta milestone May 24, 2026
@afabri

afabri commented May 26, 2026

Copy link
Copy Markdown
Member Author

Rather frustrating it seems to be 10% slower. Although with CGAL_PROFILE we see the same ratio of in sphere tests to updates of sub determinants. This holds for points on a surface as well as random points in a sphere.

@mglisse

mglisse commented Jun 4, 2026

Copy link
Copy Markdown
Member

Rather frustrating it seems to be 10% slower.

The "true" computations are just pt* and det, all the rest is overhead in some sense.
If the special point was not t but any other, say p, then qt* and others would not depend on the extra point and their max could be stored in the cached array, that would reduce the work needed at each evaluation.
I think the cited paper uses a more static filter, the bound for det is precomputed once globally for the scene. That's obviously faster, at the cost of more filter failures.

@sloriot

sloriot commented Jun 12, 2026

Copy link
Copy Markdown
Member

Successfully tested in CGAL-6.3-Ic-6

@afabri

afabri commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

I think the cited paper uses a more static filter, the bound for det is precomputed once globally for the scene. That's obviously faster, at the cost of more filter failures.

I gave a quick try what @sloriot suggested me today: The max values computed in the static filter can be upper bounded by the span of the bounding box of the input points. That leads to 10% filter failures in the in-sphere predicate for a random point cloud in a unit cube and to 75% filter failures for points forming a surface Nefertiti (rescaled to be also in the unit cube).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants