3
$\begingroup$

I am looking for the way to "quite easily" express particular curves using functional equations.

s-curves

What's important (supposing the chart's size is 1x1 - actually it doesn't matter in the final result):

  • obviously the shape - as shown in the picture;
  • there should be exactly three solutions to f(x) = x:
    x=0, x close to or equal 0.5 and x=1;
  • (0.5,0.5) should be the point of intersection with y = x;
  • it would be really nice, if both of the arcs are scalable - as shown in the left example (the lower arc is more significant than the upper one).

I've done some research, but nothing seemed to match my needs; I tried trigonometric and sigmoid functions too, they turned out to be quite close to what I want. I'd be grateful for any hints or even solutions.

P.S. The question was originally asked at stackoverflow and I was suggested to look for help here. Some answers involved splines, cumulative distribution functions or the logistic equation. Is that the way to go?

  • 0
    Presumably you also want the function to never go outside the range $[0,1]$, right?2012-07-15
  • 0
    That's right. It shouldn't go outside the range [0,1] for any x from [0,1].2012-07-15
  • 0
    The graph on the left suggests that you don't insist in having a tangent line at 0.5 (the curve appears to have a corner there). If so, then you essentially want two functions: one of [0,0.5] and.another in [0.5,1]. The boundary values are given, and apparently the first function should be convex while the other concave. Looks like a job for two parabolas.2012-07-15
  • 0
    It would be best if you could elaborate on how the things you've looked up so far *didn't* match your needs. Your problem as given is underspecified (there are lots of functions that will do the job), and it would help to get an idea of what "soft" or "aesthetic" features you're looking for to pick the best one.2012-07-15
  • 0
    @Leonid the curves should be used for image processing so I guess it would be better to avoid corners? Anyway, thanks for suggestion, that's pretty simple idea.2012-07-15
  • 0
    @Rahul well, I don't have any specified needs except those listed above. I'm looking for the simplest possible idea (the 2 last options I mentioned don't sound friendly to me) - to express the function and to calculate its values. Its application involves image processing; not sure yet how I will implement it - I consider storing precalculated values and calculating them on the fly as well.2012-07-15
  • 0
    If you want continuous derivative of 1st order, it is natural to use cubic spline interpolation - http://en.wikipedia.org/wiki/Spline_interpolation2012-07-15
  • 0
    Thanks again for that suggestion. However, will it overcome the "going out of range" and "not soft behavior" problems, which are being considered in Rahul's answer below?2012-07-15

2 Answers 2