Import all the files in one folder and run HTML file on your browser.
- Keep track of the stroke path by pushing the coordinates of the stroke points in an array.
- Simplify the line by Ramer-Douglas-Peckar line simplification method and then push the points of simplified line in new array.
- Calculate the control points from the line using bezier curves.
- Apply cubic bezier on the line.