Grasshopper

algorithmic modeling for Rhino

Divide Curve into Random Length with min and max bounds

I'm trying to divide a curve into random lengths (got that thanks to Danny), but I want those lengths between a min. and max length.  In the below example, I would like to have 10 lengths no shorter than 1.0 and no longer than 3.0. 

 

 

Views: 17388

Replies to This Discussion

Hi Milan Katic,

Its been a long time since I've looked at this problem, but I did solve it.  Give me time to dust the cobwebs and look for the files.  I will respond with an answer soon. 

Greg

No problem,

Here is something i try, not working well. Curve parts are not match with input numbers 30,40,50,60.. 

I hope you can solve this, thank you

Milan,

It's been a long time since I worked on the problem, and I don't currently have the time to study the GH model in depth.  I attached the model and you can have a look.

What I remember is the base curve was a closed curve.  The trim curve was a larger box around the base curve.  I noticed now the offset function doesn't work and shows errors.  Don't focus on that too much.  

Further down (to the right) I took a series of curves and "shattered" them into random lengths within bounds.  The model isn't very clean (sorry) but, it worked great.

What I did with these random curves is to "randomize" again in the 3rd dimension (Z) direction.  So, the curves are all random in the X, Y, and Z. 

Further, I took these random curves, connected them all together in a certain order and I created another model (not shown) that generated G-code for my CNC router table. 

You can see the final pattern on my web site.  It's the cabinet doors with the stain glass behind.

It was a fun project, but, alas, no one else thinks its as cool as myself, and I have made no money from it.  Ah, money, the profit was in the learning.  : )

My next project will incorporate Feynman diagrams.  Anything using Feynman diagrams has gotta be cool.  

Attachments:

U cant just feed the numbers int 'R' in Random I t just creates multiple domains. I think this might help

Attachments:

Here is a VB-Script solution ...

Attachments:

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