Smoother line drawing from touch input

I was struggling with nice input for drawing on the ipad. here’s a quick implementation of this code

in openframeworks:

here’s a side by side comparison of the original input and smoothed out one, it’s definitely helpful / step in the right direction: