Animate a rectangle