Grasshopper gradient according curve height

I am trying to apply gradient on the curve based on the height of each point, but each of my test and script from the internet are not really what i want, could someone helps? many thanks

gradient test.3dm (257.2 KB)
gradient test.gh (25.0 KB)

You might want to try GhGL Shader…

https://discourse.mcneel.com/tag/ghgl


gradient test_re.gh (16.8 KB)

1 Like

thank you for the suggestion but I think there are still missing something.

In the image, shorter line should be all blue. and i am also thinking is that possible to make the colour are apply on the curve but not the point on the curve.

That could be easily achieved by flattening the “N” input of Boundscomponent…

1 Like

it works!! thank you so much. But there want to ask is that any difference if I flattening the ‘N’ input and flattening the “Z” input in the Deconstruct component

Yes. Try it and see.

1 Like