Piecewise function (input and output)

Drag the red dot to show how changing the input (in red) affects the output (in blue).