Grasshopper

algorithmic modeling for Rhino

I am trying to model a pile (box) of hay. I randomly populated a solid and made the curves wiggle but the next step is out of my ability. I am a beginner.

What I would like to be able to do is randomly move each end point, within a specified domain, in the xyz axis so that they look like natural pieces of hay. It would be nice if the min and max distance from the start points to the end points could be set so that they would all be roughly the same size. Right now every "piece" of hay points directly up and down. It is fine if they intersect but they should stay as curves, no thickness. 

If you could provide any help, it would be much appreciated. The amount of hay will be increased after the issues are resolved. I will continue to work on this as well. 

Views: 746

Attachments:

Replies to This Discussion

3D populated bounding box for the hay box and points.

Vector direction for the curves.

Care not to have them point outwards off the box. (eg, if curve touch boundary of box, hay direction is inverse?)

-->Would be nice if you can control curve path

 (Sorry if this is no help at this point, found this could be interesting since I'm new as well, just pinning myself in)

Update: I was able to complete what I needed to do. I'll provide the script if anyone finds that they need it. Everything is grouped and labeled. I tried to make it as clean as possible.  

This script randomly populates a bounded box with curves. Their length is within a certain domain. The curves are then rotated randomly in three dimensions around their midpoints.

Attachments:

Well, a thought for you. Orientation of the hay is not completely random. To see what I mean, go outside, and look at a lump of grass, which is what hay is before harvesting. the individual grass elements actually have a relationship to each other; not exactly parallel, not actually random, not exactly concentric. You can even try drawing, 2D, some of  the hay, yes with a pencil on paper, to understand the relationship. So, perhaps you may wish to think about basing the relationship of one hay stalk to the next, basing the portion of stalk #2 off of stalk #1, randomized within a high and low limit for orientation.

Just a thought.

Here is another thought, how would you depress the grass area where the cows have been resting?

hmm. perhaps calculate negative space, where cows have not been resting, and use that as an attractor for hay stalks. or, calculate "boundary bubble" of the cow, then where stalks intersect this boundary, "bounce" the stalks off of the boundary layer much like an optical path reflection. 

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