software simulation of a rolling ball clock