Grasshopper

algorithmic modeling for Rhino

Hi friends,

I have a list of points. I am trying to have contours, so as you see in the attached image, point#9 has to connect #0, and this has to continue each row. Since I don't have sublists, they connect like a spiral line rather than contours. That is, as you see in the panel, I have just one line rather than having a list of closed curves. If I split the imported list to sub-lists of 10 members, I can get the conturs, but the problem is that the main list that I have has different number of points on each contour line. For example, line 0 has 10 points, line 1 has 15 points, line 2 has 13 points. How can I get contour lines out of a list which is not following any rules to be divided? I appreciate your time and help.

Views: 1670

Attachments:

Replies to This Discussion

Hi.

Like this?

Attachments:

And in case that the Other Side (he, he) is desired.

That said the sort points along curve method (where curve = intersection between a plane fit to pts and a sphere fit to pts) has "certain" limitations (topology wise):

Attachments:

you ARE the Lord!! It's amazing! Peter, Do you know what is the problem with the last layer of points? as shown in the image they are like Zigzag!

Yes that's exactly why I've captured that "layer".

In order to sort points for doing some polyline the classic approach (used "internally" in the C#) is:

1. Find a plane that "best" fits (available as native component).

2. Find a sphere that "best" fits (ditto).

3. Intersect and get a curve.

4. Sort the points "along" that curve.

But this works in some situations where the topology is "suitable" (or "cooperative" so to speak)... whilst in some others doesn't (try for instance points distributed along a  banana like skin). That said. there's other ways to attempt do that (one of them is a concave [not convex] hull).
 

For Plan B (out of many) see attached.

Attachments:

And given the opportunity have some fun with these

Attachments:

And ... er ... hmm ... that case (only for the brave, he he).

Attachments:

And finally ... 4 ways to skin (or not) that cat: in the Name of Science - what else? he he.

Attachments:

Thank you so much! It works perfectly :)

Thank you so much! It works perfectly :)

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