Added code to show the path that the animation follows as a dashed line.
Also fixed some problems with the logic for logging the keyframes in the animation.