Curve smoothing
Posted: Wed Oct 09, 2024 11:00 am
Hi Folks,
In my UFO_bas progam I used curve-smoothing code written in the late '80s. Interpolating curves is still a major maths research subject.
The original code was written for tracing contours on maps. A statistician asked me if it could be used with financial data ? Yes...!
The Demo has had one or two quirks improved, but I am still working to remove one case which causes 'sharp' points.
They are easy to trap, but not yet resolved completely. But the result is still better than most 'Bezier Spline' routines.
Curve precision can be ajusted on line 140 (prec=4 to 40). See its effects with dotss=4 on line 130 !
The code is long but fast, since the program steps far between the many conditional blocks, depending on how dots are positioned !
In my UFO_bas progam I used curve-smoothing code written in the late '80s. Interpolating curves is still a major maths research subject.
The original code was written for tracing contours on maps. A statistician asked me if it could be used with financial data ? Yes...!
The Demo has had one or two quirks improved, but I am still working to remove one case which causes 'sharp' points.
They are easy to trap, but not yet resolved completely. But the result is still better than most 'Bezier Spline' routines.
Curve precision can be ajusted on line 140 (prec=4 to 40). See its effects with dotss=4 on line 130 !
The code is long but fast, since the program steps far between the many conditional blocks, depending on how dots are positioned !