Grasshopper

algorithmic modeling for Rhino

Hi,

I want to make a basic random walk trying. I know the algorithm : go ahead > turn left/right > go ahead > turn left/right > go ahead.. But don't know too much thing about Grasshopper. 

How can I make a basic random walker on XY plane? Then I will try it on Z vector. Thank you very much in advance!

Views: 1739

Replies to This Discussion

Do you care if you go back, or if you intersect your old path?

I don't want to go back or intersect the old path. It will cause problems when I try it as 3d shapes.

Ok, that will be significantly more difficult then. Not only do you need to take care with every step to not intersect the existing path, you must also be able to retrace your steps as you may get stuck with no way out. This sort of iteration/recursion is extremely difficult to accomplish with Grasshopper.

I came up with one way, however the randomness is not consistent when the path gets longer, this may be a problem. I had a better version before, but rejected it because the 'Integers Only' option for the random component does not produce an equal amount of values in each integer bucket. This is a bug that can be worked around if need be.

Attachments:

Thank you very much. In this solution every step has another random result. Is there a way to make steps in tandem or sequent? Like a real guy's random walk, step by step. I want to learn random walk with lines, firstly. Then I will try it with boxes. My goal is to make it similar to following link. But, there would be some intersect boxes with this solution. 

http://www.grasshopper3d.com/profiles/blogs/comparing-3d-outputs-of...

I have also added Z vector to your solution and it is great! There are only two problems; 1- Step by step evolution, 2- Intersect lines/boxes

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