Grasshopper

algorithmic modeling for Rhino

hello,
i am trying to get a list containing the numbers 0 and 1.
the list length should be variable (slider-controlled, approx 200). the distribution of the "zeroes" and the "ones" should be random, start with a majority of "zeroes" and end with a majority of "ones".

the increase of the "ones", should be contollable, ideally by something like a graph mapper (bezier type).

i made some attempts with random and jitter, but could not get any good results. any idea would be appreciated.

Views: 1815

Replies to This Discussion

Jitter should be the way... Is this it?

thanks for the quick response !

your solution is very similar to the one i tried and i that i´m not happy with.

in simple words it has two halves, the lower half contains the "zeroes" and the upper half contains the "ones". the jittering moves items from one half to the other. by tweaking the jittering amount one can symmetrically inrease this "swap", but this gives poor control of where the swapping starts and ends and how rapidly it increases and decreases. if you crank the "jitter-slider" up to 0.5 the "zeroes" and "ones" are nearly equally spread over the whole range.

i am thinking of a graph mapper-like control to "mix" the two figures in a more sophisticated way ...

A more controlable way, using a bell probability distribution. It allows you to shift the "center".

It's not perfect but that's the idea...

Attachments:

wow, you´re very quick. it´ll take me some time to figure out your definition ...

1 generate a list of N random numbers Xi

2 if this number is larger than the probability at this index i, then pick round(Xi)

   else pick round(i / n) , i.e. the sorted range

fun stuff!

the formula is wrong, it needs to take N as an input too in place of 100 I think

hi fred,

great!

i made some quick tests and they look very promising. it will take more time to test it in my complex definition, i will report later. also i am not exactly figuring out,what your pick´n´choose does here.

so far i replaced your gaussian expression by a bezier and a gaussian graph mapper as it gives me some more "graphic" and intuitive approach to the curve.

thanks again!

Attachments:

Perhaps your need is resolved but here another approach.

Attachments:

thanks daniel !

made a quick test. feels good, too. have to leave the office now, will be back tomorrow to feedback.

good evening   r

OK, here a (I think) better approach.

Attachments:

Yep, that's nice...

thanks again !

i tested your definition on a hexgrid array and it works well.

it takes some time to figure out how to use the graph, but after all it´´s very useful. maybe i will try to finetune the definition, if i find the time to dig into it and then post it here.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service