From the Lab
Replicating structure-preserving stippling
Bernard Llanos — October 6, 2016 - 6:35am
I have tentatively replicated the stippling algorithm of Dr. Hua Li and Dr. David Mould described here.
The implementation of the algorithm itself was straight-forward. I am grateful that the method was so clearly described in the article.
I spent most of the implementation time creating a skeleton stippling class which would simply output three coloured dots as shown below:
For instance, I needed a priority queue for the full algorithm, and spent time setting up the Boost heap module, upon finding that the STL priority queue does not support changes in the priority values of items already in a queue.
Some results from the full stippling algorithm are as follows:
The image of the spheres originates from the Qt SVG viewer example, whereas the orchid is my own image, and the crater is a portion of an image of Mars from NASA's website (originally named "esp_044491_1585.jpg", credit NASA/JPL/University of Arizona).
The behaviour of the algorithm on the image of the spheres hints at a possible bug in my implementation. The other two results are more reasonable, although there are some exaggerated highlights in the stippling of the orchid, possibly indicating a similar problem as observed in the image of the spheres.
Note that all stippling results can be exported to SVG files. Unfortunately, I cannot upload SVG files to this blog and, for images formed by many stipples, rasterized versions of the results have significantly smaller file sizes.