Improve stopping conditions in surface meshing (and throughout GC)
@MarkGillespie is already working on this.
Since Jan 21, 2023.
Assessment
This issue has not been assessed yet.
Description
This issue addresses a small road bump with the remesh function, but is more generally something good to think about throughout the design of GC: how should stopping criteria be determined, and what control should be provided to the user?
Issue
Currently the stopping condition in remesh is
if ((nFlips == 0) && (flowDist < 0.01)) break;
Even though the quantity flowDist is normalized by the number of mesh vertices, the constant (0.01) is pretty arbitrary and often does not yield the desired/expected behavior.
Especially annoying is that one can't get more smoothing by increasing the maxIterations option, since the optimizer will quit as soon as flowDist is less than 0.01.
Proposed Solution
Three possibilities come to mind:
- Add an additional option
relativeStoppingTolerancewhich is used in place of the magic constant0.01. This is a no-brainer. - Measure the relative norm of the gradient. This requires us to assign a variational interpretation to the smoothing operations, but that seems reasonably straightforward: Laplacian smoothing is minimizing Dirichlet energy, restricted to tangential motions; circumcentric smoothing is likewise minimizing the optimal Delaunay energy among tangential motions. (I believe de Goes et al discuss how to think about ODT in terms of energy minimization in the non-flat case.)
- Add an additional option
minIterationsthat forces the optimizer to take at least this many iterations. In general, such a parameter is good to have: no matter how careful you are with designing stopping criteria, there tend to be cases where this automatic condition stopped to early—or at very least, the user would like to see what happens if you "just keep on going." For instance, in the remeshing case, it's clear just from looking at the output meshes that they are not always as smooth/regular as they could be.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nmwsharp/geometry-central
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nmwsharp/geometry-central#256 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
nmwsharp/geometry-central#255 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
nmwsharp/geometry-central#253 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 57/100
nmwsharp/geometry-central#247 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
nmwsharp/geometry-central#246 ·
All issues in nmwsharp/geometry-central
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
autowarefoundation/autoware_universe#13413 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
automated-analysis bug memory-safety
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·