TOOL: Point Attractor – Grasshopper GHUser Object

Since I am using Attractors frequently in my research, I decided to spend some time on organizing a GH User Object which is basically a grasshopper component that takes an array of points attracted to a certain point and returns the new array of points. If you don’t know what a GH User object is the go here and type GH User). You can easily install this component by placing the file provided into the User Object Directory [ in GH File-> Special Folders -> User Object Folder]. Simple as that and it is ready to use in User tab in the GH toolbar under the category Digital[Sub]stance. The component has five different input values: the attractor, the point array, the field of attraction, the force of attraction and the visualization toggle. The outputs on the other hand are the vectorfield of the attraction, the resulting point array and the visualization of the attraction range.

Attractor + VectorsThe field arranges the range of the attraction while the force defines the density by which the attractor point draws the others. By setting the force values to negative we obtain repulsion. The organization of the force is achieved by implementing a Bezier equation graph for smoother attraction.

repulsion by negative force valuesThe code might be containing some bugs so any feedback is deeply appreciated. Any upgrades are also welcome ( multiple attractors, curve attraction  ect). Download as usual from the [Sub]Code page.

Source: digitalsubstance