Example 6.
Square and Triangle Wave Forms, image adapted from Omegatron