24/09/16: Making art come to life

As a by-product of one of my strands of research, I have recently realized that it is possible to use my models of group-level bacterial movement to answer an age-old question - what would it look like if the brushstrokes in a painting came alive and started moving around the canvas? I believe Titian asked it first.

In order to demonstrate the effect, we first choose a photo of someone whose face, it is generally accepted, would benefit from being melted. There is one public figure who stands head and shoulder (but not quite hands) above the rest:

Screaming cantaloupe

(Photo credit: Reuters/Rick Wilking) Using the excellent OrientationJ plugin for ImageJ, we can extract the director field of this image at a given length scale:

Screaming directional

This shows the average direction of lines in the image within a region around each pixel. If these lines point on average straight up, the pixel is coloured white, horizontal, mid-tone grey, or straight down, black. You can see, for example, that OrientationJ has detected that lines on the right side of the face tend to point to the bottom-right, while lines on the left side point to the top-right. At the bridge of the nose, where these two sides meet, there is a transition from one angle to the other.

We can now use the director field of the image and the colourmap from the original image to define the orientation and colour of the cells in the initial model configuration:

Cantaloupe cells

This nets us a beautiful brushstroke portrait of the man, all without appropriating $20,000 of charitable funds for the privilege. To simulate the dynamic movement of these brushstrokes, we randomise the direction of movement of the component cells/brushstrokes (forwards or backwards), then use the Self Propelled Rod (SPR) model of Wensink et al:

The Scream Melts

What do you think? Personally, I think he looks a bit more cheerful for a bit before turning full on horror story. A little more like a chimpanzee as well, with an increase in the density and breadth of his brow, but a very happy chimpanzee.

31/01/16: Twilight quotations

Bella would have been surprised, but their school district had a very conservative approach to sex education and as far as she was aware, sparkling was part of the horrible, horrible miracle of male puberty. She was quite taken with it.

His pectoral muscles glistened like meat which had been left out for a week in the sun.

"Oh Edward", she sighed lethargically, "Won't you put -"

Right, that's quite enough of that.

Instead of whatever the hell that was, here is a thing. I'm being deliberately vague about it, but you might enjoy trying to figure out what it's doing. It's pretty simple (my first practical introduction to Javascript), so any interest will probably have dried out by that point.

A hint - try looking at the page during twilight hours (or at least during twilight hours in Oxford. I can't be bothered figuring out where you are, O out of England reader).

Nighttime shot

08/01/16: William's howe too cooke

The good people of Zooniverse have recently released a new project, Shakespeare's World. Citizen researchers are tasked with generating transcriptions of various Elizabethan and Stewart era documents, from letters between members of the aristocracy to the cookbooks of country ladies. In principle, these transcriptions will be mined by people like the OED to find new spelling variants of words, but I suspect most people will be doing it to have a good ogle at every day Renaissance life.

The random number generator on their server presented me with pages from the cookbook of one Susanna Packe, from 1674. Here is my transcription of the recipe on the left:

To hash a shoulder or leg of mutton, take a shoulder of mutton hallt roast it. Baste it with a little white wine then cut it in thin slices and put into a stewpan. Put with it sweet herbs, whole pepper and a little shallot or onion, anchovies or two with water according to your own discretion. Let it stew untill it be almost enough then put in it oysters if you have them then good store of mushrooms and a good deal of white wine and lemon ?shreds? Thicken it a little with butter if you will and shake it well together and when it is in the dish cover it with lemon sliced and balls and hard eggs. It is a fine hash if made well, your must needs be gravy a good deal.

You can certainly see why the British got a reputation for bad cuisine. Mutton and oysters? Blegh. Still, one of the few phrases I can read from the one on the right is 'Take chickings and blood and kepe ye blood', so small mercies.

Anyone can have a go at this - even if you can only transcribe a couple of words, you will still be adding to the progress of the entire project. You don't even need to register on their website. So give it a go! You'll be cooking questionable (but historically relevant) recipes in no time.

Mutton Hash recipe