restore triangle wave