My 3d mesh consists of 11 static points with predefined values assigned to them. These points are represented as an array of positions in 3d space along with their corresponding values:
x: 0.3 y: 0.4, z: 0.5, value: 100,
x: 0.6 y: 0.9, z: 0.66, value: 20,
x: 0.4 y: 0.22, z: 0.35, value: 50,
x: 0.11 y: 0.34, z: 0.65, value: 0,
x: 0.35 y: 0.65, z: 0.5, value: 0,
x: 0.22 y: 0.67, z: 0.5, value: 0,
x: 0.43 y: 0.22, z: 0.5, value: 0,
x: 0.67 y: 0.31, z: 0.5, value: 16,
x: 0.84 y: 0.34, z: 0.5, value: 13,
x: 0.22 y: 0.43, z: 0.5, value: 0,
x: 0.13 y: 0.24, z: 0.5, value: 11,
To color the faces of my 3d mesh, I need to assign a value to each face based on its distance from these points. I have the position of each face, but I'm unsure how to determine their values. What interpolation method should I use? For example, for this face
x: 0.34, y: 0.43, z: 0.18, value: ?
I am seeking a solution using JS/Three.js for frontend implementation or a Python library for backend processing.
https://i.sstatic.net/zkeYY.png
I have come across some methods that only work in 2D or support interpolation between two points. How can I apply this to an array of points?