Longest walk/path from available curves?

I have a collection of intersecting closed curves I’ve shattered and would like to rejoin in the longest (or a group of long) curves, example below. Similar to how you might peel a mesh using Ivy.

I assume Shortest Walk would be useful but I’m not sure how to integrate it as I don’t have a specific start/end in mind and want to utilize everything.

I could potentially use a solver, joining combinations to maximize curve lengths but that seems like a hammer approach, before I try that route, I was wondering if there was a better method? Perhaps some existing component or better search term for what I’m seeking?

Thank you.

image
image
longest walk q.gh (18.4 KB)

I don’t have an answer but a fundamental question is: What are the rules?

Can the path cross itself?

Can the path touch itself?

Can the path use the same segment twice?

What is the maximum number of base curve segments which can meet at a common point.

1 Like

Good questions! I don’t think touching and crossing is an issue, following the curve segments laid out but each segment should be used only once. I’m not sure about the base segments. I’m just experimenting with the form with a mind toward physical prototyping which means minimizing the complexity of parts and plans… aka fewer pieces.

This was my first attempt with Galapagos, randomly removing one segment from each original closed curve, maximizing the longest joined length. This went from 16 to 5 but leaves awkward corners (butt cracks) which be nice to avoid.

Also, while removing segments gives it an interesting aesthetic, I’d like to try without that. I’ll need to figure out a different way to jumble the join order, initially it just wants to join back into the original close curves, a “join only at specific points” component would be nice.

Are you seeking a continuous path between two points?

If so what are the start and end points in this figure?

This figure does not contain a continuous path using all the segments without repeating segments.

For a continuous path between two points without repeating segments there must be an even number of segments at any intersection of segments, with the exception of the start and end points. At the start and end points there must be an odd number of segments. If the path is to be a closed loop without repeating segments then there cannot be any points with an odd number of segments.

True… continuous would be unlikely would random tangent shapes but I suppose the minimum number of joined curves with the maximum length is what I’m trying to achieve.

Like unrolling with Ivy if you give it a spherical mesh… the whole orange peel thing. More complex the shape the more individual peels. I’m not necessarily hoping for “one peel” aka “one curve” though that would be cool.

How do you decide between minimum number of joined curves and maximum length? Which is more important?