esebsal wrote:
I have dubs respect the spline. Should I use 2 differts splines from P1 to P3 , and from P3 to P4 use anothe spline.
is it posible to interpolate a close circle with Akima interpolation
Cubic splines implemented in ALGLIB aren't suited for problems with overlapping segments, i.e. for problems where interpolant is circle-like (example2). Example1, from the other side, is perfect illustration for the kind of problems which may be solved with cubic splines.
What you need is
parametric cubic spline, i.e. spline where two separate interpolants are constructed: one for points on the X-axis, another for the Y-axis. You may find more info on parametric spline in the good online book by Tom Lyche and Knut Morken:
http://folk.uio.no/in329/nchap1.pdf and
http://folk.uio.no/in329/nchap6.pdfP.S. I think that I'll include parametric splines in the next release of ALGLIB.