animate_decay.py example code is less complicated

The original version of the example seemed to me overcomplicated, so I made it easier to understand.