Forum Archive

Smoothing out drawn lines

HT

Hello,

I would like to know if there is a way to smooth out a drawn line, like shown in this video: https://www.youtube.com/watch?v=Kfy0lWAV16Y

I know that certain drawing apps do it, is there an easy way to implement it?

Best wishes.

cvp

@HT Do a search of spline in this page

cvp

@HT This script works fine

JonB

you have to thin out your points... one way would be to filter data in touch_moved to only register motions larger than X pixels, or that occur after a long delay. then you would use a bezier arc to connect.

you have to compute the control points yourself, which may be non trivial.