Press the up arrow key once to start a line at the mouse pointer and again to finish it, and press space to drop a ball.
This is still rather buggy, but I've been trying to figure out how simulate inclined planes for quite some time and I'm glad I got it started. If anyone has a suggestion on how to improve this, feel free to give feedback. I have comments inside the code to make things somewhat easier to understand.