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.

Choir singing for World Water Day

Entropy Arbitrary

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

I finally got around to squeezing out the issues in the JavaScript code generated by Picture to Nonogram that might be flagged by ESLint, reducing the chances that the output pages will trip anybody up in the future.

CPREP

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.

Next

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.


Credits: The header image is World water day - choir singing by SuSanA Secretariat, made available under a Creative Commons Attribution 2.0 Generic license.