I am trying to write a simple code in Fortran OpenGl to animate the dynamics of a linear polymer.On a square lattice, initially a linear polymer is a horizontal sequence of successive top-left and top-right bonds. Equivalently, this is a series of up and down kinks. The biased dynamics is a sequence of moves of down ->> up kinks, the down kinks are selected at random and with uniform probabilities. To animate this I need to erase two bonds of the down kink and then draw two bonds of the up kink. The "erasing" a bond is executed by "drawing" another bond on top of it using the background colour. The problem is when I run my code for a certain duration of Monte Carlo time, it is giving me the correct picture of the final configuration of the polymer at the end of the simulation, but not showing the sequence of intermediate microscopic moves of kink flipping. I guess, I must be missing one or more graphic commands. I can send the code if anybody tries to help. Finally, I am working in the Linux (Ubuntu) environment.