Triangle wave

Needed to use Stringbuffer