# Convex curve interpolation

I have a set of points $$(x_0,y_0)$$ ... $$(x_N,y_N)$$ with the $$x_i$$ increasing and the $$y_i$$ such that $$\frac{y_{i+1} - y_{i}}{x_{i+1} - x_{i}} > \frac{y_{i} - y_{i-1}}{x_{i} - x_{i-1}}$$

Is there a well-known interpolation scheme that would give me a smooth function $$f$$ that is continuous, differentiable, and convex?

I don't want to constrain the derivative at the $$x_i$$, I just want the function to be as smooth as possible without introducing inflexion points. Ideally the derivative should be as smooth as possible as well.

Edit: For instance, in the following charts, I am trying to fit a set of points that are clearly convex. However the kernel interpolation I am performing is not:

• A natural cubic spline will probably be convex "by chance".
– user65203
Oct 17, 2018 at 9:38
• This is what splines are for. Check out Bezier curves (quadratic and cubic are most widely used in computer graphics). It works by gluing parabolas/cubic lines according to some condition in the middle, and depending on the choice of constraints (minimal total curvature, continuity of derivatives, etc), you can get what you want. en.wikipedia.org/wiki/Spline_interpolation Oct 17, 2018 at 9:39
• @Yves Are splines smooth? I thought they were only $C^2$.
– Jam
Oct 17, 2018 at 9:44
• @Jam: the OP is asking continuity and differentiability.
– user65203
Oct 17, 2018 at 9:45
• @Yves They ask for a smooth $f$
– Jam
Oct 17, 2018 at 9:46