Added a function which applies linear attraction force to 2D model