Grasshopper

algorithmic modeling for Rhino

Image sampler: assigning values according to a known gradient.

Hi guys,

I ran a debris flow simulation in RAMMS, then exported the image as a jpeg. I know the gradient values. Although I would like to assign values to the various RGB according to the gradient. I can't get my head around it.Any help would be appreciated. Refer images.

Views: 627

Attachments:

Replies to This Discussion

Anyone guys?
I am not sure it will work but sets could be useful
Create a set with your gradient but perphas it will be difficult to know how many color is in there
So for each color you coul get an index to 0 to the number of color -1
Extract the color of the image you want to analyses and use members index
The remap the index with the physical range
Hope it helps a bit
Yeah it's been asked before and I uploaded a solution using Find Similar I think. Works well enough as long as the gradient you sample doesn't use a colour more than once.

I'll see if I can find that post, but intense googling is difficult on an iPad...

Thanks David,

I will try if this approach works in my case( it should actually). Anyways, appreciate it.

Thanks David, with a better understanding of how the image sampler works I was not only able to assign the values but regenerate the image on the target surface.

I Laurent, Thanks for the advice. will work on it.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service