Giver n random vectors on a plane, calculate a grid of vectors that lerps them all

25 Views Asked by At

I'm working on creating a grid of vectors that averages the wind direction and strength measured in multiple cities at a time.

My question is :

Given n objects (cities) that each have an origin point, angle (wind direction) and magnitude (wind speed). How do I calculate the values for a grid of objects with the same properties, that linearly interpolates angle and direction ?

visual representation

in this image the starting objects (cities) are the white vectors, and I have set the grid vectors in red to be equal to the closest white vector to them.

Thanks !