How can I create a gradient twist angle effect?

How can I create a gradient twist angle effect? I made a formula myself, but there is no gradient torsion effect like the reference picture.方条局部扭曲1.gh (122.4 KB)

This is what I want, can you provide this formula? Thank you

方条局部扭曲1107.gh (17.1 KB)