triangular signal in python