Color coding by Gradient a group of surfaces by height of their apex

Dear All

I have came up with this simple feature in which the height of one corner point of each Srf4Pts are affected by an attractor hence each surface has a different apex.
The challenge comes as I would like to use the gradient component to differentiate Surfaces with highest to lowest apexes.
I am ware that I can identify the raised points easily but plugging the points into the gradient will not give me the surface gradient effect.
Could some kind nobles please point me in the right direction in how to identify the surfaces by their Apex hence achieving the Gradient color in relation to the Apex height?
I have attached the image for your reference.

Many thanks to all knowledgeable Grasshopper Nobles!


Hope it helps you out… (11.0 KB)


Thank you for your sharing。

Hi Kim

Thank you very much. Yes I gathered that the Gradient Component can detect the height of Extrusions. However, I need to use Surf4points to link up the 3 indexes of each grid to the Index that has been moved up resulting in a single surface ( like ceiling panels).
I then need to differentiate the height of the resulting 4pt surfaces by the Gradient Comp. which wasn’t possible.

is there a way round this?
Many thanks for your thoughts!


Without your file, I can’t help…