Simulating brush strokes for painting application

DrRobot picture DrRobot · Jun 18, 2010 · Viewed 8.2k times · Source

I'm trying to write an application that can be used to create pictures that look like paintings using simulated brush strokes. Are there any good sources for simple ways of simulating brush strokes? For example, given a list of mouse positions that the user has dragged the mouse through, a brush width and a brush texture, how do I determine what to draw to the canvas?

I've tried angling the brush texture in the direction of the mouse movement and dabbing several brush texture images along the path, but it doesn't look great. I think I'm missing something where the brush texture should shrink and grow on corners.

Any simple to follow links would be appreciated. I've found complex academic papers on simulating e.g. oil paints but I just want a basic algorithm to use that produces OK results if possible.

Answer

brainjam picture brainjam · Jun 18, 2010

Here's a classic from 1989 - Dynadraw, by Paul Haeberli. It uses a simple dynamical model to fill in a smooth the raw mouse positions.

While the strokes are drawn incrementally as polygons, you should be able to use the points generated by the dynamic filter to place copies of your brush texture.