Skip to content

barycentric extrapolation should not override interpolation #1700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Fil opened this issue Jun 18, 2023 · 2 comments · Fixed by #1701
Closed

barycentric extrapolation should not override interpolation #1700

Fil opened this issue Jun 18, 2023 · 2 comments · Fixed by #1701
Assignees
Labels
bug Something isn’t working

Comments

@Fil
Copy link
Contributor

Fil commented Jun 18, 2023

I have made a mistake when designing the “extrapolation” part of the barycentric interpolator. Adding points to the frame can create huge distortions when the frame doesn't include all data points—for example when we zoom in on a region.

If we think that points that live inside the convex hull should be governed by the normal triangulation (as I do now), we have to rethink how extrapolation works.

@Fil Fil added the bug Something isn’t working label Jun 18, 2023
@Fil Fil self-assigned this Jun 18, 2023
@Fil
Copy link
Contributor Author

Fil commented Jun 18, 2023

I have explored a solution here: https://observablehq.com/@observablehq/barycentric-extrapolation-1700

@mbostock
Copy link
Member

Looks good to me!

Fil added a commit that referenced this issue Jun 18, 2023
@Fil Fil closed this as completed in #1701 Jun 24, 2023
Fil added a commit that referenced this issue Jun 24, 2023
Fix barycentric extrapolation

Note: When points on the hull are collinear, the extrapolation fails in some regions. I've found a way to fix this by reprojecting the points (to make the hull slightly bulge out, which resolves the ties), but in the end it was too much code for a use case that is pretty bad anyway (the delaunay triangulation itself being unstable in that case). This seems to be quite enough.


closes #1700

---------
Co-authored-by: Mike Bostock <[email protected]>
Fil added a commit that referenced this issue Aug 21, 2023
Fix barycentric extrapolation

Note: When points on the hull are collinear, the extrapolation fails in some regions. I've found a way to fix this by reprojecting the points (to make the hull slightly bulge out, which resolves the ties), but in the end it was too much code for a use case that is pretty bad anyway (the delaunay triangulation itself being unstable in that case). This seems to be quite enough.


closes #1700

---------
Co-authored-by: Mike Bostock <[email protected]>
chaichontat pushed a commit to chaichontat/plot that referenced this issue Jan 14, 2024
Fix barycentric extrapolation

Note: When points on the hull are collinear, the extrapolation fails in some regions. I've found a way to fix this by reprojecting the points (to make the hull slightly bulge out, which resolves the ties), but in the end it was too much code for a use case that is pretty bad anyway (the delaunay triangulation itself being unstable in that case). This seems to be quite enough.


closes observablehq#1700

---------
Co-authored-by: Mike Bostock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants