I Work at NuOffer.com we work with documents, and this documents have signature.
So we created a signature algorithm, to try to be as close as possible to the signature behavior of a pen.
Anyway please fell free to copy, change improve, and let us know what do you think.
We used, this tutorial
http://www.merowing.info/2012/04/drawing-smooth-lines-with-cocos2d-ios-i...
This guy has a great app called Foldfy kids love it... Please take look on the tutorial so you guys can see why i did this code.
We also use a Vector2D class.
You guys can try to change the pen_pattern.png image to see if you find better results.
Leave a comment on what do you guys think about the code and what the changes you think should be made to improve the code.
This is the final result of the code.
http://myowngames.com.br/appicons/draw_test.png