The ball comes out the spinning wheel, it hits the circle that changes the color to [0,0,1,1] (blue) and the collideset to 2 (b), when it hits the second wheel, the color is set to [1,0,0,1] (red) and the collideset to 1 (a)
It goes among the gears.
It hits a small bar, the color is set to [0.5,0.5,0.5,scene.my.color] and the scene.my.color = scene.my.color + 0.05, and starts at 0.1, that means it can make 18 hits until the color will stay the same.
I hope you understood this description
questions are welcome..