Resample with binsize?

ahoj guys! I want to re-sample a generic grid of point (in 2D).
in the example here I have a 4x4 grid (white points), and I’m re-sampling it to 5x4(green points):

how can I generalize this? I mean, interpolate a generic NxM grid in order to have a N1xM1 grid?

grid.v4p (15.8 kB)

hahaha I did the same question 2 years ago