You can’t do that kind of transformation; however, there are some workarounds that might help:
Create the shape as you expect it to be in its full form and place additional shapes on each side (same color as the background). You can then animate them to move to the sides when scrolling, creating the effect that the shape in between is expanding.