Comments (3)
Proposed fix starting at line 343 SemiVirtualIntegrityCheck:
double h = geoOp.inCircle(a, b, c, d);
if (h > 0) {
if (e.isConstrained()) {
// because the edge will not necessarily have had conformity
// restored, we do not automatically treat the test as a failure here
if (h > thresholds.getDelaunayThreshold()) { // ADDED THIS TEST
this.nDelaunayViolationsConstrained++;
this.sumDelaunayViolationsConstrained += h;
if (h > this.maxDelaunayViolationConstrained) {
this.maxDelaunayViolationConstrained = h;
}
}
} else {
this.nDelaunayViolations++;
this.sumDelaunayViolations += h;
if (h > this.maxDelaunayViolation) {
this.maxDelaunayViolation = h;
}
if (h > thresholds.getDelaunayThreshold()) {
message = "InCircle failure h=" + h
+ ", starting at edge " + e
+ ": ("
+ a.getIndex()
+ ", " + b.getIndex()
+ ", " + c.getIndex()
+ ", " + d.getIndex() + ")";
return false;
}
}
}
from tinfour.
You make a good observation. The constrained-violation count was intended as a qualitative view of how often an inCircle() violation was suppressed due to a constrained edge. It would be more meaningful if it were changed to match the logic in the restore-conformity modules.
Coincidentally, I recently changed the wording in the IntegrityCheck printSummary() method from:
- Detected Delaunay violations within tolerance
to read
- Detected acceptable Delaunay violations within tolerance
I think this better conveys the fact that the algorithm tolerates very-small violations for efficiency purposes. Someday, when I have some spare time (as if that would ever happen), I want to try using Shewchuk's robust inCircle() implementation. Shewchuk's predicates are supposed to always give the correct answer regardless of numerical precision issues. It would be interesting to see how much performance overhead they require.
from tinfour.
Changes made as suggested and new code uploaded to git.
I am marking this issue as closed.
Thank you for your observation. Having a user with a fresh perspective on the code is a welcome resource.
from tinfour.
Related Issues (20)
- Simple Volume Model support for non-English Locale HOT 1
- Enhance Simple Volumetric Model to read soundings from Lidar (LAS and LAZ) files HOT 1
- Enhance SVM to include shoreline in output shapefiles HOT 1
- Enhance SVM to write GeoTIFF elevation files HOT 1
- SVM improve sample-spacing computation HOT 1
- SVM change to reduce memory use HOT 1
- Extend API in support of enhanced interpolation logic
- How to import a constructed TIN data, instead of rebuilding it with tinfour IIncrementalTin HOT 6
- Should `.visitTrianglesConstrained()` generate triangles for TINs with no constraints? HOT 2
- Java Heap Space, unlimited loop in Tinfour
- Performance Discrepancy HOT 6
- Some pinwheel edges' B vertex are null HOT 4
- Can't open recent LAZ files HOT 10
- TinfourDemo finds no ground points even they are there HOT 4
- TinfourDemo rendering is upscaled for `-Dsun.java2d.uiScale=2` HOT 4
- Provide more access to internals for Natural Neighbor Interpolator HOT 1
- Question how to use idw in combination with Bounded Voronoi
- Error in shapefile writing for SVM operations HOT 1
- Shapefile reader can fail on empty records HOT 1
- Error reading UTF-8 strings from shapefile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinfour.