Smoothed Velocity data auto scrolling right.....

Community Forums/Showcase/Smoothed Velocity data auto scrolling right.....

Blitzplotter(Posted 2010) [#1]
Here a little you tube ism, my first one!

http://www.youtube.com/watch?v=lV4spfK4wlc


This shows a version of my running data comparison utility, the two graphs are the same data, one of them has had a basic smoothing algorithim applied.



this was a previous incarnation, its come on a little bit since then:-





Warpy(Posted 2010) [#2]
Is your smoothing algorithm only looking at two points at a time? The gradient of the curve jumps at each data point, so you're gaining no information about acceleration, or even losing some.

If you look at the first big 'peak' on the left, you can see what the problem is. The runner is clearly slowing down at pretty much a constant rate, because the three data points beginning from the top of the peak lie roughly on a line.
If you required the gradient of the curve at the middle point to be equal to the gradient between the two surrounding points, for example, you'd get much nicer, and more reasonable, curves.

Have a look at cubic interpolation. I've written some code for Catmull-Rom and Bezier splines.


Blitzplotter(Posted 2010) [#3]
@Warpy, your spot on, my smoothing only does two points at the mo, it is very early days.

Thanks for the tips on cubic interpolation, your code looks well commented. I intend to digest it & apply it to my code in doo course.


Blitzplotter(Posted 2010) [#4]
@Warpy, I added a slightly modified version of the Catmull Rom Spline your smoothage thread. It basically reads in some raw data, then allows you to still plot extra points with the mouse. The points created with the mouse seem smooth enough, however the raw data does not seem to want to smooth. I've tried spreading the data out by a factor of 8 to try and tease the smoothage into play , but no dice....

No doubt I've missed out something glaringly obvious!

Added the code that produced the following image here:-

http://www.blitzbasic.com/codearcs/codearcs.php?code=1522




Blitzplotter(Posted 2010) [#5]
Added some minute markers & thicked up the plotted graph to help distinguish from the x,y and markers axes.



Anyway, off to build a go-kart with the kids.