forum.alglib.net
http://forum.alglib.net/

fitting closed contours
http://forum.alglib.net/viewtopic.php?f=2&t=872
Page 1 of 1

Author:  intelharsh [ Wed Jun 26, 2013 7:33 am ]
Post subject:  fitting closed contours

Hello people!

I started using aglib and am getting fantastic results for open curves.
I am currently using "Penalized regression spline" for closed curve fitting.
But, I am not getting satisfactory results. What should I do for closed curves?

Regards
Harsh Deshpande

Author:  intelharsh [ Thu Jun 27, 2013 7:19 am ]
Post subject:  Re: fitting closed contours

Hey guys,

I was finally able to solve this using parametric equations.
We can find parameters for (x, y) by
t(1)=0
t(i+1)=t(i)+sqrt((x(i+1)-x(i)^2+(y(i+1)-y(i))^2); i=i,...,n

Then use cubic spline for (t, x) and (t, y) and plot the resultant (xS, yS) (where xS and xS are resultant of spline interpolation).
Hope this is the right way of doing it.

Thanks
Harsh

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/