First of, i am really sorry if i poorly described my question, i am no mathematician but i need to figure this out for my project, and i am having hard time finding the formula.
I work with numbers from 1-10 Where 1 is 1, 5 is 5 and 10 is 10 - Linear (as expected)
But i need to make my set of numbers like this 1 is 1, 5 is 2.5 and 10 is 10 - This would be a smooth curve like in my image bellow:
The red line represents thew result where the black dotted line is the linear 1-10. B is the point that i want to be able to control
Alternatively, i might also need to be able more control points later on in addition to "B".
(I need to be able to write this in a function where it would calculate the new value for any given number based on the control point B, e.g. i plug 5 i get 2.5)
Thank you so much
edit: The curve between 1 - 10 must stay positive and be smooth (without bumps)
edit2: @Rahul suggested Monotone cubic interpolation, i think that's what i am after
The thing is i need to use this in my program i am writing, and i have no clue how.
I've found a video where it's used in excel (but the algorithm isn't provided). How could i use that as the guy inputs numbers and gets interpolation? (algorithm /formula)?