I'm trying to make a simple, variable transforming function from an InputOutputCharacteristic.
I want it to go from a simple curve above y=x (eg.y=x**1/2), through linear (y=x) to a curve below (eg. y=x**2).
I also want it to go from an "S" curve (one that goes horizontal, vertical, horizontal) to a rotated/reflected "S" curve (one that goes vertical, horizontal, vertical).
I'm doing this by having two Input / Output points that I move and then use Smoothing to spline between them.
Here's the code...
InValues: -1.0 {!Bottom - 1} !Top 1.0
OutValues: -1.0 {!Bottom negated} {1 - !Top} 1.0
So I'm achoring the start of the curve at (-1, -1) and the end of the curve at (1, 1).
The "Bottom" point moves along a line from (-1, 0) to (0, -1).
The "Top" point moves from (0, 1) to (1, 0).
If I set Smoothing to 0.5, ie. linear, I get a 3 segment linear curve that does excatly what I'd expect. But when I try smoothing it, it goes asymetric. For instance for curves above y=x the smoothed curve leaves the Bottom point smoothly but overshoots and joins the Top point at a discontinuity.
How do I get the curve symmetric, especially when the bottom section is near vertical and the top section near horizontal (or vice versa)?