Problems with creating attractor/magnet for extrusions

Hellooo there. First time posting in the Grasshopper forum, so excuse the noobish question:

How would I create an attractor/ magnet between extruded curves and a rectangular surface? As in, I would like the extruded curves to range in height based on how close their control points are to the planar rectangle surface. I added a photo of where I’m stuck. Thanks for helping out!

Google -> attractor curve grasshopper

If you still can‘t figure it out I‘ll help you tomorrow

1 Like

thanks tim, I’m going to try this method when i get home: http://formularch.blogspot.com/2012/04/gh-line-attract-repel.html

still a little unsure how to grab the control points of curves as attractor points, but ill give it a go

The “pull poin” component is one possible solution. It pulls points (mid point of curve in this example) to a geometry (can be curves points etc). And it also gives you the distance between the original and the projected points. Than you remap the distance to the domain you want and do whatever you want.

Btw. upload your file next time you have a question (rhino geometry internalised), it’s just faster to help.

attractor_re.gh (11.5 KB)

Tim, this is exactly what I was looking for. Thanks so much, you are a wizard. This definition is pretty powerful.

I will be sure to upload the definition file next time, I appreciate the tip. Have a good weekend.

That’s from my way old blog (2012) :smiley: . If you are interested in this tween / blend type stuff check out my plug-in Pufferfish.

1 Like

Thanks Michael, definitely going to check it out! I’ve seen some of the work you’ve created using Pufferfish on Instagram – awesome stuff.

1 Like