N
N
Nikolay2015-05-11 11:31:39
JavaScript
Nikolay, 2015-05-11 11:31:39

Does anyone have a Js formula for cubic interpolation?

I have an array with points x, y from which a graph is built in the future.
4.5.png
I need to get an array of intermediate points (cubic interpolation) to get a smooth graph.
4.4.png
I must say right away that this is not canvas.
Array of the form:

x: [1,3, 9, 27],
y: [5,12,22,35]

That is, from the point x1.y5 to the point x3.y12, I need to get an array of intermediate points.
Please tell me the formula in js to get the interpolation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-05-11
@Dinfyru

https://github.com/osuushi/Smooth.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question