How to make a line array from dense to sparse, then from dense to dense

How to make the line array from the dense to the sparse, and then to the secret, this formula I made the way, do you have any better methods?

渐变线条1.gh (11.3 KB)