Trilinear interpolation of vertices

Hi community!

Here is a pic:
TrilinearInterpolationVS

And there is a working demo:
https://codepen.io/prisoner849/pen/LoKQoR

Interpolation comes by 8 control points in an array of a modified material’s uniform.

     Y
     |
    [2]-----------[3]
    /|            /|
  [6]-----------[7]|
   | |           | |
   | |           | |
   |[0]----------|[1]--- X
   |/            |/
  [4]-----------[5]
  /
 Z

PS If someone’s interested in an example of bilinear interpolation, you can find it here https://codepen.io/prisoner849/pen/NVVJBW and in this topic Beginner to Three.js looking for guidance on working with the vertices of a mesh

PPS 3D Grid is here: 3D grid of lines

UPD An example with a rounded box: https://codepen.io/prisoner849/pen/VJZZBL

12 Likes

Turns out I was looking for exactly that just the other day, thanks @prisoner849 :heart:

1 Like

@sciecode
You’re welcome :beers:
Glad to know that it helps :wink:

An update to the main post :slight_smile:
One more example is added.

2 Likes