Grasshopper

algorithmic modeling for Rhino

Hi Grasshopper community,

I have two issues with the image sampler that I need some help on. It's quite a simple definition, and hopefully the solutions are simple too.

01. I have a black and white jpg and would like the image sampler to produce circles on the center points of anywhere there is white in the jpeg. It's performing almost perfectly except that the result is producing the smallest of circles on the portions of the jpg that are black. Is there a way that once the sampler would not allow any circles where the jpg reaches full black. 

So instead of producing a circle on every cell center in the grid, I only want the circles where there is a trace or more of white. So this would cut down significantly the amount of 'smallest size' circles.

02. For some reason, the output is producing circles slightly pushed to the right. The values and content of the jpg are perfectly centered from the edges, yet it just off center. Looking for a solution to this too.

Thanks for the time and consideration everyone.

Views: 1338

Attachments:

Replies to This Discussion

See images below.
Assuming I understood your questions correctly:
For question 1, you can use a "smaller/larger than" boolean test and cull the results.
For question 2, I think the issue you are referring to is because you are drawing sampling the points using the corner points of the cells. Sampling at the center point of the circles should resolve it.

Cheers

This nailed it. Thank you so much.

You are welcome.

If you want to have more control over final diameters of each circle, you 

should take a look at the remapping component.

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