Parametric pattern series

Hi Kim. im stuck to achieve my desire pattern. and also the definition suddenly feel heavy. can u help me with this?

sine graph 2_reV2_wani 2_inverted_18.07.23 R2 half.gh (32.5 KB)

i did a script to achieve the pattern i want but its just a repetition of same script.is there any way u can simplify it?

sine graph 2_reV2_wani 2_inverted_18.07.24 resize.gh (59.3 KB)