Gradient size pattern according to an attractor point

I would like to create a pattern base on a base geometry (I am starting with a square hoping to improve it to an hexagon), that according to an attractor it change its size (scaling up and down). How can I do it? What I reach until now is this level (see image, I did it following this tutorial I create a grid that using slider I can subdivide in smaller square but I am not sure if is the correct path to follow for my goal. Thanks