Updated triangle_wave