The trickiest part was getting the balls to roll correctly. That was really just a case of tweaking the values and lots and lots of testing until the balls were rolling at exactly ( to my eye ) the same speed as they were moving.
Isn't that the easiest part?
2*radius*pi is the circumference of a ball.
For a distance of 2*radius*pi the ball rotates 360 degrees.
Calculating the distance the ball rolls per frame, dividing it through (2*radius*pi) and multiplying with 360.0 results in the angle the ball turns per frame around its local x-axis.
And putting side on the ball a decreasing percentage of the result above is calculated to turn the ball additionally around its x-axis and y-axis.