Gradual rising

Hi. I’m kind of new to grasshopper and I was wondering if anybody could help me with this task.
I’m trying to create a geometry where the rectangles are parallel to the ground at first but gradually become perpendicular to the ground along a particular curve.
I will attach a picture of what I’m trying to achieve. Any help would be much appreciated,

Gradual (13.5 KB)


Thanks so much @HS_Kim this is excellent.