Grasshopper

algorithmic modeling for Rhino

I have a series of 4-point surfaces and I am trying to classify them based on the measure of an angle between two of their sides. I would like to assign color to these surfaces based on the angle measurement. I would appreciate any help...

Thank you!

Views: 5729

Attachments:

Replies to This Discussion

Hi Sameer,

you could map the angle onto a Gradient object, then use the gradient output colour to control the diffuse channel of objects in the [Custom Preview].
Is this what you mean? (image attached). I am not sure if the result is what I was expecting... how do I better control an even spread of the gradient?
Thanks David.
Attachments:
A way that uses less components (though your setup would do the same thing) is to use a Scalar > Interval > Bounds on the list of data to get the min and max of tht list...use a Scalar > Interval > Interval components to get the Min and Max ... for me its an easier way to do it, over the list item route...

Now that answers absolutely nothing regarding your situation because its more about the data coming in and its visualization. I would need to know the list of data before I can comment further...downloading now...
Since I do not have your definition with the gradient, I cannot see what went wrong...I am sending the definition I tried out and an image showing the result...hope it helps.
luis
Attachments:
This is great, thank you.
With my previous setup using list items, I was able to get a better gradient after sorting the list. I wonder why this method does not need sorting.

To take this further, is it possible for me to divide the interval into say 5 divisions and assign a different color to each group? In other words, I want to categorize the panels based on an interval of angles. I don't really want a gradient.

Thanks again.
I tried it out by using the gradient tool but not as a gradient. I feel that there must be a more elegant way of doing this.

Moreover, I seem to be getting only a part of it right... the third interval (yellow) seems to completely cover everything...

Any ideas?

Attachments:
Here are two options, note the second option will be limited to the number of divisions you want...the number of groups...

The first option is easy. If you look at the zebra option David has in the gradient component, you could divide it up graphically...

The second option is kind of not so elegant, and I am sure others could redo it in a better way...essentially sorts, subdivides the list into 5 groups, and then uses the tree branch to split them out in order to color them...being that its time to quit for the evening, I am sure there are better ways of going about it ;)
Attachments:
Thanks again. Very helpful.

I have just realized that these colors that I generate by gradient cannot be baked! I was thinking of using Giulio Piacentino's tools to bake the geometry with the color... but the custom preview does not have any output! That is a huge disappointment :(

Any suggestions how I can bake these colors?
the colors you need are from the gradient or color swatches...custom preview just paints the geometry with color...
You could still use Giulio's component. It needs to be given the geometry, and a corresponding color value for each (just like the preview component) and it would bake it for you. It just wont be a preview.
Of course. I am all set... Thank you all; this has been extremely helpful.
Just curious about structuring a dithered color instead of a smooth gradient. I've been using the graph mapper and settig my domain and list values to be concurrent. any ideas about how to get a smooth dither with using a point for distance?


-andrew

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