make piecwiselinearcurve