Create a grid made of cylinders with radius proportional to Y-distance

Hi, I am not expert with grasshopper so I hope it won’t be hard to solve my problem.
I have this grid and I would like create cylinders with axis coincident with lines and I would to assign to each element a different radius, according to the distance from the y-axis(shorten direction).
Do you have an idea how could I do it? To make the idea I would like to have a radius R on the lines closest to Y and R/2 on the farther lines.

Thank you very much for any help.


Use end-points for each cylinder axis, measure the distance from those points to either a Line coincident with the y-axis or a YZ plane (whichever makes more sense). From these two, you need the smallest distance, so use a Min component or a Min(a, b) expression.

It worked perfectly, thank you very much David