Point box, curve and multiple attractors

Hello, people of Grasshopper! First-time poster here. Long time user of Dynamo, fresh to Grasshopper.

I am playing around a bit with attractors, but I stumbled upon a dead end.

I have a box of points so to say and a curve and I would like to use the attractors to displace the points closer to the curve with some kind of an exponential expression to get some cool forms.

So I divided the curve into points and found which points from my box are closest to these points, the respectable vectors and distances. But the problem is that I get the distances out in one flat list and to remap the distances in a logical way I have to get the distances sorted pro point.

Does anyone have an idea how I can get around this? Or maybe use a whole different approach?

Untitled.3dm (32.3 KB) Point Box_Edges_1.gh (21.9 KB)

Welcome @borna.molnar-erhatic,

Is this “crazy” enough? :wink:

If not, you can play with the sliders and settings to change the shape to your liking.
I’ve included a recipe to get a n.u.r.b.s surface or mesh at the end, if that’s what your after.
Of course the displaced points are also still available.

Point Box_Edges_2.gh (22.5 KB)

1 Like

Wawawiwa nice!

Thanks you very much for this, cant wait to tear you script apart :slight_smile: