Added code to animate magnetic field,

added code for attraction forces