Grasshopper

algorithmic modeling for Rhino

Connecting row of points consecutively into lines

Hello!

First of all, I would like to apologize for my very messy and not-optimized-at-all gh file. I am a complete beginner, as you are about to see :D. I am trying to make a miura ori pattern, and I would have to connect the points as shown on the picture (in order to be able to control these points, therefor the lines too, afterwards). I am attaching the picture and the .gh. I apologize if the question is unclear or not enough information provided - just let me know! I appreciate every comment!

cheers

Views: 5589

Attachments:

Replies to This Discussion

Using the "Flip matrix" component will rearrange your list such that all the 1st items of each list are now in their own list, and second items in a second list and so on... In more complex situations you might need to use the "Path Mapper" to do this (which is a really handy tool to get your head around!)

Attachments:

THANK YOU SO MUCH!

Why not use Polyline instead of Shift, Line, and Join?

well, i wanted to have a line between every two points in order to be able to control it later on - move it along z axis to get something similar to miura ori pattern, to make it foldable, which i then planned to make into surface. although, im not so sure anymore if this logic functions. Horizontally works fine since I have made it work through changing points in the origin curve. But now I thin I am stuck.

Good point. To be honest: Old, bad, habits... But can I pretend I was trying to show what more components do? If so, that.

Ok. So, I came to the point where I have realised I should use the path mapper. So now basically I should have a zigzag line as an end result. I am trying to figure out how to do the mapping i order to be correct, but the most far i have come to was to have 0-0, 1-1, 2-2... (as shown on the picture). Is this the direction you were aiming at? Or am I getting it completely wrong? I would appreciate all the help. 

Attachments:

Hi Setizlica,

Try this way, first zigzag polyline is done, you can expand it to the other point .. anyway someone else might have a better/shorter way to do it

Cheers ..

Attachments:

Have a look through this. It uses the path mapper to properly arrange the list numbering of two sets of information that you had before going into the same Flip Matrix and Polyline (thanks, David!) components. I've left all the param viewers attached so you can see what is happening to the list structures at each point. (Someone might also be able to add the flip matrix into the Path mapping, but I couldn't get it working when quickly looking over it! Anyone to the rescue?)

Attachments:

Hello all,

why not weave the 2 lists of curves before calculating the control points (before turning the lists into trees)?

This way you can avoid the path mapper altogether

([weave] is the oposite of [dispatch] that you have used in the previous step)

Amazing... 

Many thanks to everybody! Amazing community you have here.. Thanks again!

I'm sure there is something cool and insightful about this suggestion (and others here too, perhaps?)...  But the initial code (connecting_pointsJA.gh) is too complex, at a glance, for me to understand the question or the answers.  Too bad, because it feels like I'm missing something useful.

Would be great to see a distilled version using internalized data that better illustrates the problem and solution?  Thanks.

I have to admit I also just skipped the rest of the definition and just focused on the part that the question was about.

There was an array of curves on Z and Setizlica wanted to move every other curve on Y and then draw polylines, going up, through the control points.

By the way, another approach:

Instead of using [dispatch] to break the list in 2 and then rejoin them into 1, you could create 1 list of vectors, with every other vector being 0, and apply [move] on the whole list of curves (see group #2):

 

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service