Sort points for tag line

Howdy. The dots are “trees”. I can group same types as a cluster with a distance too. But then I need to run a tag line (Landscape thing) through the lines that tidy. Something like 1 or 2 in the pic below. Was using a closest too method but its to random.

as usually I’m just trying wacko stuff till I stumble across something.

This land form node kind of does it

Reverse every other list in the landform node. :slight_smile:

Also, for a “box” radial sorting you could generate bounding boxes of sequential sizes, center them on the collection of points, and use the first passing bounding box containment to get groups of rectangular loops. Then sort by angle about the Z axis to the X axis and back. Then flatten the list and play connect the dots.

Reverse every other list :thinking:

What is first passing bounding box?

owww do you mean reverse this list of coordinates? But those coordinates are grouped into a list of themselves. So maybe I get an average distance between the line and if its outside of that chop the list? Or something something :nerd_face: why is it so fun trying to work out these problems.

Yes - after you group them into rows on the Y value, sort them by their X value, then reverse every other row. :slight_smile:

1 Like

Build the lists of bounding boxes (you have this, but make sure they go from smallest to largest).

Use a bounding box containment test with the point as an @L1 input.

Get the first index of ‘true’ and use that to group the points.

One thing which will help: do one small set of points at a time. You have nested lists already and that is asking for a failure.

1 Like

Whats the best way to group in rows? How I was saying or do you know some other magic?

ahhh yes! I wasn’t thinking about the order of the bounding box as I stared hopelessly at the true values in the wrong location. Although I was populating the circles size from a sequence node that was smaller to larger so you’d think theyd be in order.

I need to work with the nested lists as there locations for different grouped tagging lines.

The other method seems more promising I can work out. So unless we want to chase the dragon on this one. Could leave it.

Offhand you might try this: List.GroupByKey(pnts,Math.Floor(pnts.Y/resolution))[“groups”];

Typing in my phone late on a Sunday so pardon any typos. :slight_smile:

1 Like

I think I need an node that gives me the value between each number in the list. Which might be these floors ones. Ill experiment. Ow wait I group X by Y

now reversing every second list… Not sure how to extract every second list and then reintegrate. Ill insert points after I figure it out

One way:
List.Chop > List.Transpose > a[0]; a[1]; > List.Reverse (a[1] list, longest lacing) > List.Create > List.Transpose

tricky with the nested lists

List at level 3 for the chop. :slight_smile:

This might be relevant to your interests:

Organized and annotated:

1 Like

Still confusing myself here running through every lacing :upside_down_face:

What about groups of points to have radial sorting? :grin: :grin: :grin:

is this the same as trying to achieve the chop? Only thing is struggling to reverse the nested list and keep the list amount the same

na things are getting mucked up