Grasshopper

algorithmic modeling for Rhino

Hi, I am a novice Grasshopper user, and I've run into a bit of a bump.  I'm trying to create a pattern that has different sized rectangles (currently just squares) in a random arrangement that do not overlap each other. 
My first thought, was to use the image sampler script, http://www.sean-madigan.com/2012/05/03/image-sampler/, to create rectangles of various sizes based off an image.  However, the rectangles are created via a grid, and I would like to figure out a way to make their position random, rather than grid based.
Within the script, I played with a second option and was able to create a boundary that was populated with random points, and rectangles at each of these points.  But I could not figure out how to then influence the scale of the rectangles based on the output from the picture in the image sampler.

I've attached a sketch to show what I'm shooting for, in case there's an easier, better way of making it!

Thank you,

-Paul

Views: 3503

Attachments:

Replies to This Discussion

In case the grasshopper file does not have elliptical gradient image in the image sampler, I've attached a screenshot of the canvas showing how it was hooked up.  I'm not sure how to embed the image into the script, but hopefully this helps if it isn't showing up.  Sorry for the double post!

Hello Paul,

I believe you just need to implement what you did in the first case: scale the rectangles with a factor based on the image sampler outputs:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service