Today is World Water Day, where the United Nations advocates for better management of freshwater sources. Given how water stress affects an increasing number of communities, it’s worth at least considering where your water comes from and what’s being done to protect it.
I posted a link to the new repository for blog assets as mentioned last week. I also added the script that I use to run a quick grammar and style check for posts, which probably won’t work particularly well for anybody who isn’t me, and have been cleaning up other scripts.
Picture to Nonogram
It looks terrible and has some minor bugs, but I finally added a primitive headshot generator to CPREP. The basic idea is that it models a skull as a curved octagon, where each side of the figure—accounting for bilateral symmetry—has a random size.
While it needs improvement, this provides head shapes that range from round to rectangular, to diamond-shaped, to triangular. Throw in randomly generated eyes, nose, and (one day soon) mouth at the proper proportions, and it’s at least a loose approximation of what a person might look like.
When I’ve previously considered doing this, I wanted to base it on a prior work. Unfortunately, every approach I’ve seen to this is under a non-Free license, the closest being non-commercial. This—again—isn’t ideal, but it should be possible to massage this (for example, tweaking the proportions and adding cheekbones and a brow) to produce a cartoon headshot that mostly just lacks hair and any adornment.
Naturally—in multiple senses of the word—it would make more sense to model the subset of skull bones that are front-facing and build a face around those resulting contours. But until I (or someone else) gets the motivation to do that, the octagon is probably fine.
I don’t know if I have a good model to do it, yet, but I’d like to make some obvious improvements to the CPREP headshot, like adding actual lips, brows, cheeks, and a chin.
It might also be fun to take a closer look at the Picture to Nonogram data structure to find a way to provide hints.
Tags: programming project devjournal