Slope s = tan θ.
With c = 106, an input of 255 maps to about 255.
Below a → 0, between a and b → s·p (s = tan θ), above b → 255.
Between a and b → s·p (s = tan θ), everything else → 0.
x-axis: input gray level p, y-axis: output gray level q. The dashed line is q = p; grey bars show the input histogram.
Run a transformation to see the result here.