introduced scale transform to make rainbow look good in more situations, refactored some ball drawing content to ball class, abstracted some variables, improved documentation