Grasshopper

algorithmic modeling for Rhino

Hi All,

I've made a little definition wich smooths out a closed polyline curve. But to really get the effect i want i need to repeat the process until none of the points suffice to the conditions i've set. Do you know how to do this?

Until now i've made a series of this definition, wich turns out good in most cases but not all.

best regards Reinder Weenink

Views: 752

Attachments:

Replies to This Discussion

Bump.

Hoi Reinder,

you're talking about conditional iteration I believe? I.e. "repeat these steps until some condition is true"

There's no way to encode iterations in Grasshopper directly, though the HoopSnake and Anemone plugins offer some reprieve here. It's also possible you can solve it using Kangaroo, as it performs its own iterations internally. Unfortunately I'm not up enough on the aforementioned plugins to help out.

What I can help with is a VB or C# approach. The algorithm you came up with doesn't look too difficult to encode, and while in a script component, you have full control over iterations. Would you be interested in such an approach?

I attached a C# script which runs a loop until there are no sharp vertices left.

Attachments:

Hi David,

Thanks for replying and the script you have made for me.

you're talking about conditional iteration I believe? I.e. "repeat these steps until some condition is true"

Ive done some googling and this indeed the thing im talking about. I will try to put this in to my algorithm.

many thanks and happy Christmas!

Hi David,

I've just tried your script. But it isnt exactly what my definition did. Your script deletes all sharp vertices sharper then the given angle. (Ik ga even over op Nederlands, in het Engels kan ik dit lastig uitleggen). Mijn definition haalt alle laagste punten uit de curve, zodat je het effect krijgt alsof je een touw om je originele curve heen spant.

Best Regards

Is dat hetzelfde als Convex Hull op alle curve vertices?

Hi David,

Het is inderdaad hetzelfde. Ik had echt geen idee dat deze functie ook in grasshopper zat. Dat had me heel wat hoofdbreken gescheeld.

Hoe werkt deze convex hull?

Gr.

Ik geloof dat het Graham Scan is, maar ik weet het niet meer zeker.

Hoi de oplossing die hij heeft bedacht is wel een stuk eleganter.

thanks deze tip heeft m'n project echt een stuk verbeterd

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