You will have position of the ball stored in the array. Also, angle of the bar is also in array
As the ball is moving, angle is changing and the speed of moving ball also.
Everything should be in 2d only and without any external js libraries
[url removed, login to view]
be serious with prices