Setup code to draw a moving rectangle