Hi everyone, I know this must be very simple using Interpolations.jl but I can’t get it to work. I have a 3D curve in an array (example bellow) and I need to have 10 times more points. Linear or Bspline interpolation between the points are OK.
Any idea?
Thanks in advance
Dierckx.jl parametric splines interpolation is perfect for this problem:
using Dierckx
N = size(rayo,1)
spl = ParametricSpline(1:N, rayo') # adjoint to have data series along matrix rows
tfine = LinRange(1, N, 10*N) # interpolates with 10x more points
xyz = evaluate(spl,tfine)'
Could you post a graph of what exactly you mean to avoid misinterpretation?
If you refer to the “overshooting” of the interpolating parametric splines in the plot below of the y coordinates versus point number, this can be overcome by using the smoothing option that does not pass exactly at the points: