I am trying to get a closed curve which have to go exactly through all the points (given below) and trying to get sample 100 equidistant points from the graph using R. The first and last points can be joined to get a closed curve.
Here is a set points
X Y
-0.04494395 -0.051481617
-0.01102178 -0.032550217
0.01193315 -0.072318417
0.04585535 -0.053448067
0.07975850 -0.034595817
0.05682070 0.005183833
0.03377230 0.045034983
0.01057130 0.085048283
-0.02335468 0.066181283
-0.05729975 0.047296183
-0.03407970 0.007294283
-0.06801145 -0.011644717
I want to use spline fitting (not regression). Could anyone help me in this regard? Here is what tried so far
d=splinefun(x, y,method = c("natural"))
I stuck here: how to get 100 equidistant points from this function?