Simple AS3 Line Smoothing

— 1 minute read

While researching for drawing tools, I’ve come up with a simple implementation of a pencil tool and line smoothing.

Here’s the idea:

  • Capture the points drawn by pencil tool in an array.
  • Filter a new points array from the original one by skipping points in the middle (to reduce turns & angles)
  • Finally, use a simple point-to-point curve drawing algorithm. I use sample code from this article by

The result:

Click to view the demo
Click to view the demo

You can find the source of this demo here.

[Vietnamese tag: Làm mượt nét vẽ đơn giản với ActionScript]