Without even looking at your code, this sounds like a classic problem; you're working under the assumption that anything in
draw() is drawn automatically. Instead, however, the canvas is only updated at the end; you are effectively displaying only the last position.
You have to split it up across several frames (probably with an incremental variable)...
See
I display several images in sequence, but I only see the last one. Why? on the Processing Wiki.