Video & imagesPainting with python and libcairo

Painting with python and libcairo, L. Nielsen, Saturday, March 07 2009.


The following images were rendered as vector using libcairo from Python. A single particle, the behavior of which is driven by the content of an input file (an archive in the case below) and by following the gradient curve of the luma of the input image, draws a number of contiguous line segments with varying width (function of luma) and color (sampled from the input image). The total number of individual strokes in the two examples below are 55,633,680.
 
 
 
Of course, the particle model can be swapped for redrawing with circles positioned by evaluating luma and color based on the recursive processing of a quad-tree spanning the input image:
 
 
 
Or instead of circles, capsules:
 
 
 
Each script correlates to a single filter, making it easy to arbitrarily combine and automate the generation of images or application of the filters to video sequences:
 
 
[ENDS]