how to produce s-curve in P3 & P6