Attractor point - How does this work?

I was given this file but I couldn’t figure out the maths behind the process of moving points.

Questions:

  1. Why is it necessary to square the remapped distant value?
  2. What exactly is the function of Vector 2pt here? Why does it need to generate vector between points and the sphere (attractor point) when there is distance data generated already?


Thank you in advance for your help!

06_Data List_Sorting for undulation pattern v2.gh (32.4 KB)

This is optional , you can use what you want and you can make it simple.

attractor point.gh (11.1 KB)

BTW: Given the opportunity … If you want to manage multiple attractors (in push/pull mode) this is the standard algorithm and the maths - shown a test 3d grid (thus the 3 (i, j, k) nested loops) and 3 attractors:



Note: the pull mode is not that simple (if you want to never “overpass” any given attractor resulting a “negative” deviation - so to speak). Plus a cubic interpolation is required (many attractors).

Get these to illustrate the above (note the never overpass state in pull mode):