A simple seesaw you can use if you want. :) Credit is appreciated but not required. Only one line of code! No pen!
This works because cosine is a wave so the cosine of the ever decreasing variable keeps going up and down, changing the degrees! Code 100% by me