Grasshopper

algorithmic modeling for Rhino

Hey everyone,

Quick question. If I have a curve, lets say a circle, with points divided along the circumference of the circle, how do I get an attractor to push the points away, but to get them to slide along the curve rather than bending the curve?

I've been using graph mapper to control the points along the curve but it tends to get quite messy so I'm now trying to get an attractor to do it to see whether it turns out more smoothly.

Feel free to add other suggestions!

Cheers,
Jeremy

Views: 3213

Replies to This Discussion

If you want to move points around a curve, your best bet is to manipulate their t-values directly, as I imagine you've been doing with the graph mapper. Here's an example definition where I'm getting the t-value of the closest point to my attractor, and then finding the difference in t-values between the division points and the attractor's closest point. It then manipulates the difference mathematically (scaling the absolute values of the differences to a defined range) and then adds the resulting values back to the original t-values of the division points. It seems to work decently well for periodic surfaces like a circle or ellipse, but it might break down a little near the seam of more complex closed curves.

There might be a more elegant way to approach this, but this is the first one that came to my mind. Hope it helps!
Attachments:
Is it possible to use the same definition, on multiple points on the curve?! i tried but seems that doesnt work....

Hey Andrew,

 

abs(x) nice expression :-)! But why is it here not working?

 

Best regards

 

DeDackel

Attachments:

Hi DeDackel,

 

In this case the contents of the panel are not being converted from strings to numbers. To fix just pass the panel through a Number Param. Also David, has now included an Absolute Component, but it still needs the Number conversion.

Hey Danny,

 

Thank you! Fast and precise answer as usual :-)

 

Best Regards

 

DeDackel

Hey, I was wondering if it was possible to give the point a maximum adjustment value then stop and push the next point x distance and so on down the line based on the strength of the attractor?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service