Grasshopper

generative modeling for Rhino

Hey everyone!

I've been in a "quest" about creating a definition that would generate a list of points from a starting point and randomly generated vectors, and wouldn't grow beyond an imposed limit.

The way i've been trying to make it sound a bit cruel (and not very smart): evaluate the proximity of the last point to the limit and, if it's closer than it should be, that point is eliminated.

The idea was that the algorithm would return to the previous point (valid) and generate a new valid point (and so on)... but it doesn't quite work like that! For some reason, it (sometimes) "crosses the fence", and i can't figure out why :/

All help is welcome, please!

Thank you all ;)

Tags: generative, limit, recognition, vb

Attachments:

Reply to This

Replies to This Discussion

Hi rvzkm,

This is how I suggest you might do it. The code is commented for details.
Attachments:

Reply to This

Thanks for the help Rajaa! Your code is beautifully simple :)

For some reason, the code only works if the distance to the boundary is tested with values equal or greater then "length" and not with other values. This probably has to do with the vectors.

Once again, thanks ;)

Reply to This

You welcome.
Not sure I understand what else you need to do.

Reply to This

This is just a small test for a larger algorithm - that i hope to have working before the end of July.

When it's finished, i'll poste it here ;)

Reply to This

RSS

© 2010   Created by Scott Davidson.   Powered by .

Badges  |  Report an Issue  |  Terms of Service