Linear interpolation of scattered 2D data

So, I have some irregularly spaced data that I want to interpolate onto a regular grid. (I want to make this one , but in Java) Here is the picture:

Scattered data for interpolation

Basically, I have the x and y coordinates of each point and the z value associated with each point, and I want to interpolate between them and fill the center of my image.

What is the best way to do this using Java? Is there a built-in 2D interpolation library that I can use, or should I try to “roll my own” approach?

I want to do exactly what this answer points to, but in Java.

This post and this one also seem to be trying to do what I am, but their answers are not entirely applicable.

Someone else with the same problem, but without a solution.

Note. I use JavaFX-2, so if I could use the class in some way Interpolator, that would be great.

.
.
EDIT: If someone stumbles upon this and wants to find out what I used, it was an implementation of Delaunay triangulation from BGU:
The main site of the
API code

+4
source share
1 answer

If linear interpolation is enough, I suggest you use a 3d mesh with Gouraud shading to draw:

  • Convert 2d point cloud to grid (you can use google for existing algorithms)
  • z
  • Gouraud Shading
  • ( )

, JavaFX. JavaFX 3D-, . , JavaDoc TriangleMesh, - , (x, y, z) (u, v) ( ).

+1

Source: https://habr.com/ru/post/1547825/


All Articles