This is for my math class and took about an hour to make due to some tricky calculations. The variable 'triangle' represents the number of triangles in the problem. Controls - space to run, up arrow to increase, down arrow to decrease.