Use up and down to change the numerator of the tangent of the angle the cannon makes with the x axis. You can also use the slider. Type n to type a value. Use left and right to change the denominator. You can also use the slider. Type d to enter a value. Press space or click the cannon to shoot. Match the colors of the balls. When you hit the same color ball, it should disappear and you should get 1 point. However, the game mechanics could use a little work. Pressing r will give you a guide line. Pressing t will give you horizontal and vertical guidelines. Pressing h will hide the guidelines.
Known Issue: The game mechanics need some work. I fixed the color matching somewhat, but now there is an issue with determining when the level is cleared. However, it does work as a trigonometry demonstration, and that's the main reason I shared it.