piecewise functions and cylinder