Replies: 3 comments 1 reply
-
I'm going to have to think a bit about how to better support your objectives. But for now, I will try to clarify the way area constraints work in Tinfour. Tinfour grew out of geophysical applications, and some of the design choices reflect that origin... I think constraints are one of them. In Tinfour, a constraint is really just a way of partitioning the coordinate plane into separate areas. Think of water/land or even the case of a roadbed (which marks a 1st derivative discontinuity in a surface). So an interpolation is valid on either side of the partition, just as long as it doesn't cross the partition. And, if properly implemented, an interpolator will not cross a constraint (though it occurs to me that the recently introduced the Inverse Distance Weighting interpolator doesn't honor that requirement). To address your problem, you could either implement a pre-test or extend the interpolator class to:
You might find it works better to try using the navigator's getContainingTriangle() to clarify the assignment of the local geometry. If you'd like I can try to put together some demo code illustrating the concept described above. Also, just out of curiosity, which interpolator are you interested in using? |
Beta Was this translation helpful? Give feedback.
-
Revision to above notes... Actually, I would recommend calling the navigator's getContainingTriangle() method. And then calling the SimpleTriangles getContainingRegion() call. The Javadoc in the code for getContainingRegion() warns about a potential problem, but that Javadoc is out-of-date. I fixed that problem for Issue 47, but failed to update the Javadoc. |
Beta Was this translation helpful? Give feedback.
-
Looking at this posting again, I see that I haven't really addressed your question. I will need some time to think about this problem a bit more. I'll try to look at it this evening. |
Beta Was this translation helpful? Give feedback.
-
I have a few points to make about how constraints interact with interpolation.
Without constraints
Interpolation of a triangulated vertex set without constraints.
This is pretty much expected: a interpolation field across the convex hull of the vertices.
With constraints
A screenshot of interpolation applied to a tin with a PolygonConstraint applied (based on the vertices).
My first observation is that interpolators interpolate across unconstrained regions — would it be more appropriate if they return NaN for such areas instead?
I notice the intended colors aren't really there anymore. There either averaged away somehow or I suspect this is because it's ignoring z values of vertices on the constrained edges? If so, that's rather problematic as that's where all the vertices are!
Desired
Desirable: interpolator returns NaN for coordinates outside the constrained region. Vertices that lie on the polygon constraint (the edge) contribute properly to the constrained region's interpolated values.
Beta Was this translation helpful? Give feedback.
All reactions