Grasshopper

algorithmic modeling for Rhino

Hi forum,
I'm working to assign color mesh by slope,
It is possible assign to vector display compoment color?

Thanks

Views: 2654

Replies to This Discussion

Do you mean like this?

Attachments:

You'll need to map the z-component of the normal vector to a gradient. Make sure your gradient goes from -1 (pointing straight down) to +1 (pointing straight up). If you only care about positive slope, you'll need to take the Absolute of your normal vector z direction and your gradient should only go from 0 (vertical slope) to +1 (horizontal surface).

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Good evening everyone,

Thank you to both David I think the approach is correct,

the results are nice. All this would be to assign a gradient type *. ggr chosen by the user. See this link:

http://soliton.vm.bytemark.co.uk/pub/cpt-city/index.html

 

Thanks for your helping, I've decripted a ggr file but i don't understand a result.

The color "HSL" used but i don't view a 0-360° color....

If you send me the file format description (if you can find it) I can try and add it to the Gradient object. I've looked briefly at the site you mentioned but it seems to have loads of different gradient and palette formats, some of them in binary, others containing thousands of colour entries... bit daunting.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

David,

You will find the info dan zip sce necessary for a type of gradient. All other gradient uses the same format.

That file is damaged. I found that attaching rar files to Ning posts never works. Please use Zip.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Sorry,

Attachments:

DEM, ggr

Attachments:

Hi David,

Thank you for this Updated yesterday. I

 wonder if you had advanced in the decriptage files *.ggr. Thank you in advance

Hi David,

Wish:

F parameter:

Gradient file (*.ggr or other gradient file format: *.cpt, *.c3g, *.cpt, *.gpf, *.inc, *.psp, *.sao, *.svg)

  • *.ggr file exemple:

GIMP Gradient
Name: RdBu_11
11
0.000000 0.045450 0.090900 0.403922 0.000000 0.121569 1.000000 0.403922 0.000000 0.121569 1.000000 0 0
0.090900 0.136350 0.181800 0.698039 0.094118 0.168627 1.000000 0.698039 0.094118 0.168627 1.000000 0 0
0.181800 0.227250 0.272700 0.839216 0.376471 0.301961 1.000000 0.839216 0.376471 0.301961 1.000000 0 0
0.272700 0.318150 0.363600 0.956863 0.647059 0.509804 1.000000 0.956863 0.647059 0.509804 1.000000 0 0
0.363600 0.409050 0.454500 0.992157 0.858824 0.780392 1.000000 0.992157 0.858824 0.780392 1.000000 0 0
0.454500 0.500000 0.545500 0.968627 0.968627 0.968627 1.000000 0.968627 0.968627 0.968627 1.000000 0 0
0.545500 0.590950 0.636400 0.819608 0.898039 0.941176 1.000000 0.819608 0.898039 0.941176 1.000000 0 0
0.636400 0.681850 0.727300 0.572549 0.772549 0.870588 1.000000 0.572549 0.772549 0.870588 1.000000 0 0
0.727300 0.772750 0.818200 0.262745 0.576471 0.764706 1.000000 0.262745 0.576471 0.764706 1.000000 0 0
0.818200 0.863650 0.909100 0.129412 0.400000 0.674510 1.000000 0.129412 0.400000 0.674510 1.000000 0 0
0.909100 0.954550 1.000000 0.019608 0.188235 0.380392 1.000000 0.019608 0.188235 0.380392 1.000000 0 0

Exemple of gradient file:

http://soliton.vm.bytemark.co.uk/pub/cpt-city/views/totp-ggr.html

Good idea.

Thank you, this should be easy to integrate?

@+

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service