Help with grasshopper Gradient component please!

Hi there! I’m having some troubles with grasshopper’s gradient component. I have a set of points that connect to a map I have in rhino (file linked), and for each point is a corresponding “pollution value”. These are measurements I have taken while on this site, and my hope was to create a map indicating the values of measured pollution by colouring each point in, using the gradient component. My problem is that the colouring of the points seems very random; the gradient component does not seem to be correctly linking the points I want to colour in and their corresponding pollution measurement. This is easily visible because all of the coloured dots are also displaced along the z-axis by the length that their pollution measurement represent. I hope this makes sense…

Anywho, if anyone has any ideas as to how this problem could be fixed (I’m fairly certain that my problems comes from my own misuse of the gradient component, but I can’t be sure…) any help would be appreciated!

PS: My rhino document seems to be too large to send, if anyone knows a way around that too haha

Agathe




To send to forum.gh (10.3 KB)

You didn’t internalize your geometry. (Bottom Left Corner, Top Left Corner, Bottom Right Corner)

You’re right, here is a version with the internalized points. Hope you can open it now…
To send to forum 2.gh (19.4 KB)

Yes, this makes sense, the Z values should correspond to the color gradient and they don’t. I’m baffled. :thinking:

This is using your first GH file with minor changes to exaggerate (ReMap) the Z values.


gradient_2022_Nov6a.gh (21.6 KB)

Funnily enough, it appears that the gradient is actually doing its job correctly. I attempted to colour in only the circles (without putting the circles through the boundary surface component), and their heights (so their pollution value) now perfectly correlates with the colours I want to obtain through the gradient component. I’m quite uncertain as to why the boundary surface component is completely randomising the colours once they are surfaces… Would you know of another way to get the circles to be coloured in?

Oh WOW! I see what you mean. That is truly bizarre!! It also works correctly if you graft the input to Boundary Surfaces, so I guess what is happening is that overlapping circles with the same Z values are being combined, which is normal… Fooled me though. Good catch! :+1:

P.S. It also works correctly if you replace Boundary Surfaces with a simple Srf param:

Aww man you’re the best, thank you for your time! I have to get more familiar with grafting and flattening, I still have some trouble understanding what it really does half of the time. Thanks again for the help, you saved me hours of frustration haha! (and now I have a map that really shows what I want). Have a good day :slight_smile:

1 Like

You did almost everything right. In this case, graft works because of the nature of Boundary Surfaces which will combine lists (branches) of curves when possible. As I said above, if you had used Srf instead, you wouldn’t have seen this problem. It got me too.

1 Like