I need to develop an algorithm that connects points in a nonlinear way, that is, with smooth curves, as in the image below:
TheproblemisthatIcannotfindthebestsolution,eitherusing Bezier curves , Polimonial Interpolation , Curve Adjustment , among others.
In short, I need a formula that interpolates the points according to the figure above, generating N intermediate points between one coordinate and another.
Ex: In the image above, the first coordinate (c1) is (x = 1, y = 220) and the second (c2) is (x = 2, y = 40).
So if I want to create for example 4 intermediate coordinates between c1 and c2 I will have to get an array (x, y) of 4 elements something like this:[1.2, 180], [1.4, 140], [1.6, 120], [1.8, 80]
Would anyone have any ideas?