Grasshopper

algorithmic modeling for Rhino

Minumum Distance Between Random Points (I found a way, but its really messy)

Hey,

So I need to create a set of random numbers, but have a minimum (adjustable) distance between them. Simple I thought.... well not so easy. I have found one way, which works... but is real messy.. any one have any ideas? Im STUCK!

Thanks!!!

Views: 828

Attachments:

Replies to This Discussion

Hello,

maybe this could be a way

best

alex

so this appears to work great, except it doesnt actually give you all the options. Say you have a domain of 10 and a minumum distance of three, using this method you get 4 options, but there are many more options then that. Does anyone know the best way?? 

In trying to approach this , i am realizing this is a serious math problem... ugh...

just to clarify say I have a domain of 10, and minumum distance between numbers is 2, then what i get from this is 2-4-6-8-10 when in actuality to be actually random it would be something like 1.2 -2.36.......

any ideas?? I am desperate!!

Attachments:

thanks, but am i missing something I cant get this to work. Say I have a domain of 256 and I want 4 numbers with a minimum of 76 between them, no maximum??

and zero is always the first number in the series, so three new numbers

Set 'min gap' to 76 and 'max gap' to 256, adjust 'Number' until the last number exceeds 256 (then disregard that one), play with the "Seed" value.  This isn't CAD and iteration in GH is too hard so I'm bored already.

my king, I believe u may be mistaken I have tried to do this

You're making a mountain out of a mole hill.

Attachments:

Haha sorry my brain was fried last night, ended up using my sloppy way, but this is dope! Thank You! 

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