Grasshopper

algorithmic modeling for Rhino

Hello people, 

I would like to assign a numerical Range to a Color range (Blue to Red) of a heat-map -actually an axial map- , having the colors as the given data and asking for the numbers. 

So I have this axial heat map (attached pic) from space Syntax and I want to turn it into a 3d surface. The heights of the surface's points should be the corresponding numeric value to the color of the axial map .

Any ideas?

Views: 3306

Attachments:

Replies to This Discussion

  1. Duplicate the gradient as best you can with the Gradient component
  2. Generate a dense colour palette from the gradient by sampling it at 100 or so values
  3. Sample the colour from the image using the Image Sampler
  4. Use the Find Similar Member component to match a sampled colour against the gradient palette.
  5. Voila

You do need to pick the gradient accurate, I didn't do a very good job of that.

--

David Rutten

david@mcneel.com

Attachments:

Thank you so much . This is just great .

Incidentally, if the image isn't really a gradient but just a collection of lines with -say- 5 different colours, it may be smarter to just create those 5 colours individually. You can use a pixel-editor to get the exact RGB values and then you don't have to make a gradient and sample it.

--

David Rutten

david@mcneel.com

The picture is an output of Space Syntax and I dont really know how many colors it uses.. so its safer to use a gradient I guess.. I have a quick question though: Why do you use the 0.8 as the comparative value before Cull? I am missing that point . thanks ! 

I cull all colours that are brighter than 80% white.

--
David Rutten

I'm pretty sure that the colours might be a product of plotting the analysis values on a 0.0 to 0.7 range and using this as the hue value on a hue/saturation/value colour model (in Grasshopper HSL). Attached a file demonstrating the principle, hope it helps..

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service