Grasshopper

algorithmic modeling for Rhino

AUTOMATE / LOOP line drawn from endpoint of previous line segment to closest point

Hi friends,

I've set up a definition that manually draws a line from and endpoint of a previous line segment to the next closest point within a random 3D point cloud. (four rounds at this point)

a. how would I feed this into a loop? is is it possible since my definition is culling the indices of the previous endpoints? tried using anemone but couldn't figure it out

b. can I cleanly extract all the curves after rounds of looping?

thanks! 

Views: 3188

Attachments:

Replies to This Discussion

Hi.

It is called "Travelling Salesman" algorithm.

And this is called the Dark Side

Attachments:

thanks peter.

this is some next level stuff and I'm too noob to understand. but its fun to play with.

I have a lot of "similar" things. One day when you are ready ring a bell.

thanks HSK!

One caveat; how would I specify a starting point(s) outside of the generated point cloud? Your definition is indexing a point within.

What caveat?

What is it in your eyes look like?

Your starting point is indexed from the generated point cloud.

How would you specify a starting point outside of that?...for example, I want my start point to be a referenced point that's 100' away from the box.

hope I'm making sense.

Then, add outside point(Use merge or whatever,,) to your point list.

Merge got it to work perfectly.

is it possible to have two, three etc traveling sales man?

AFAIK that's only possible for traveling saleswomen (up to 666 if memory serves well).

bless jah

BTW:

Not sure if you are aware about the traveling salesdog big problem.

The problem arises because dogs are not allowed in the business class ... meaning: they fly in the peasant class (economy) ... meaning that minimum span trees and other freaky stuff is/are the only way to shorten dog's discomfort (economy is indeed awful: they don't even serve some proper Vodka).

For local business:

For global business:

For LOL business (Earth after Armageddon):

Of course I treat my dogs quite differently:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service