In 2016 I started doing a bunch of illustrations for mySociety’s EveryPolitician project to accompany what would be fundamentally technical articles (I was being paid to write the articles; I did the illustrations for fun). Software-related topics are notoriously hard to illustrate because they are abstract, but Tony, the project lead, proposed a personification of “the bot” that was executing much of the code. It was a great idea. I finalised the initial character in its cartoon form first, and then built a POV-Ray model with that as the reference... and had a blast. The primary illustrations were in a challenging but ultimately fun 3 × 1 letterbox format that suited Medium, where the articles were being posted.
The unusual thing about these images is that they were all made in a text
editor, not a 3D modeller (in some places a bitmap image file is included,
for screenshots or logos). That is, I typed them in, using POV-Ray’s
scene description language
and
constructive solid geometry
(CSG). My basic 3D-trigonometry is a bit rusty but I can still do things like
this for fun (it’s a mostly useless skill). There remain a few people out
there who still take an interest in POV-Ray, so I’ve linked to the
.pov
source files and added some notes below... but really,
these days the only reason for creating images in such a text-based way is if
you’re generating them programmatically.
Click on an image for the full-size version on GitHub.
The image with GitHub’s Gundamcat is the only one that isn’t pure POV-Ray rendering: the lens flare was added in PhotoShop in an attempt to make the drab image a little more interesting.
Probably the most complex thing in these scenes is the coil of the web-hook and I didn’t work that out by myself. Joining it to the cylinder took a bit of jiggery-pokery.
My favourite image is the Vitruvian bot because it’s playfully exploiting the nature of the CSG with which the bot is built (sadly, that image was never used). But floating in space is neat too because all those asteroid chunks are “simply” one call to an isosurface function (specifically, POV-Ray’s crackle pattern) — it’s demonstrating the mind-boggling (to me) truth that POV-Ray is mostly about calculating the edges of functions in 3D space, and making them look good.
The 3D trig I mentioned at the top of this page is most clearly demonstrated by laying out the circle of coloured studs (the mySociety logo) on the cylindrical surface of the bot’s back. If you know trigonometry then that isn’t remarkable, but being able to do things like that springs to mind whenever people berate what they were taught in school maths for its uselessness. (See also: Pythagoras’s theorem).
The “busy day” image (which shows the bot
surveying its GitHub activity for the day: dark blue for a pull request,
light blue for a commit) is potentially an example of how programmatically
generating these images could make sense. However, this was a one-off hack
so I just
walloped the numbers into the source
and did not use the GitHub API to get them. POV-Ray does support
animation (with its clock
running from 0 to 1) so it would be
possible to run that over a range of dates. You’d need a little patience
because it takes a while to render, but it’s certainly do-able.
The OGP map bot was used for a presentation at
the
Open
Government Partnership summit at the end of 2016
(and this blog post).
It was made as an animation — hence the clock
in its
POV-Ray source.
The animation here is from a slightly tweaked version of that source code...
the bot is translated z
an extra -0.4
to stop its
antenna being cropped.