How to make a triangle wave

I might be far off base on this one, but it looks like your half-flip algorithm is really doing sin(x) + sin(x +/- a quarter wave), which is sin(x) -/+ cos(x).

Try squaring the result of each flipbook. This will keep the result normalized, because sin(x)^2 + cos(x)^2 = 1, which might actually be the artifacts you’re noticing… not that it’s non-linear.