Here is the first approach I would try.
Step 1
Find the point of 4 nearest neighbors by Euclidean distance. It is important that these 4 points are linearly independent, since later on they are used to create a barycentric coordinate system. These 4 points become the vertices of your pentachoron (aka 4-simplex).
If the nearest neighbor checks are too slow, try structuring your data in a spatial search tree that works in 4D.
Step 2
Now we need to associate the value with the interpolation point X. Let's start by deriving the X-representation in this new barycentric coordinate system. This barycentric coordinate consists of 4 numbers, which together describe the relative distance between the interpolation point and each of the 4 simplex vertices.

Normalize the barycentric coordinate so that its components sum with 1.

Each of these four simplex vertices is a data point and has an output value. Combine these 4 output values ββinto a vector.

Finally, we interpolate by calculating the point product of the normalized coordinate with the vector of output values.

Source: this idea is actually just a 4D extension of this gem in the middle of the Warypedia Barycentric system system page .
source share