Grasshopper

algorithmic modeling for Rhino

Hi all, I'm looking for a simple method for applying varied "preview colors" to a collection of boundary surfaces. Initially, I'm only looking for a method to assign 3 or 4 random colors to the surfaces (shown below in pink)

Eventually, I would like to be able assign a numerical value (or range) which would assign a color based on that data - from an outside source like excel (as an example). Thanks for any suggestions! 

Views: 1100

Attachments:

Replies to This Discussion

Here is an example of applying different colors based on surface's area. I believe you can easily change it to any values you want.

What this definition does, is:

calculate the area of each surface[area]---> sort this list and synchronously sort the list of the surfaces[sort] (so each area still corresponds to the right surface)---> create a domain from the min and max area[Bnd]---> divide this domain by the number of colors you have[Div]---> test which of the areas are included in each sub-domain[Inc] (sub-domains are grafted so that all the areas are tested in all sub-domains)---> For each sub-domain, cull the surfaces that are not included[Cull]---> Preview each group of surfaces with a different color[Preview]

hope this is clear

Attachments:
Thank you Nikos

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service