Categories

## Renaming Cities Based on their Coordinates

While driving through Normandy, I was struck by the wackiness of a lot of the local place names. This is amplified by the large linguistic flow through the area, and local dialects that I’m not familiar with, but still felt very silly. For example: Looking at names like these, I figured that I could make […]

Categories

## Polarization Images

Have you ever played with polarized films? If they’re aligned, they look transparent. If they-re misaligned by 90 degrees, they become opaque. Let’s use this to make pictures! The intensity of transmission is governed by Malus’s Law, which says that the intensity is , where is the misalignment of the two films. Now how can […]

Categories

## Geometrically Approximating Pi

Archimedes found good estimates of pi by computing the perimeter of regular polygons that fit snugly inside and outside a circle. I’d like to take this basic approach and add some more modern twists. I say more modern, but I don’t mean cutting-edge. Taylor series are from the 1700s CE, compared to Archimedes living in […]

Categories

I want to have the ink on a photo clump together, leading to a black and white image. This is a sort of flow, so my first thought is to take a look at the advection-diffusion equation. Let’s say that the ink distribution across an image is , the diffusion factor is , and the […]

Categories

## Rearrange a Picture into Itself

Previously, I took one photo and rearranged its squares to make a version of another photo. How about a sillier version, where you use one image to re-make itself? The simple answer is to just keep every square in its original place, but that’s no fun at all. Instead, we can add the requirement that […]

Categories

## Text Processing of The Dresden Files: Word2Vec

In my previous post, I did some statistical analyses of the Dresden Files novels. Now I want to do some fancy stuff with vectors. Word2Vec is a method for turning a bunch of words in text into related vectors, as the name implies. Using a shallow neural network, it represents finds vectors such that words […]

Categories

## Text Processing of The Dresden Files: Statistics

The Dresden Files is a series of very fun books by Jim Butcher, with a wizard detective getting into trouble and saving the world and all that. I’ve wanted do do some Natural Language Processing (NLP) on a body of text, and with fifteen novels so far (two more later this year!), this is a […]

Categories

## Photomosaics, with repetition

Previously, I recreated an image by rearranging squares of another image. Typical photomosaics allow for repeated use of tiles, so I’ll try that for comparison. I’ll still allow rotation, as it helps the edges so much. The image on the left is the result: It works, but isn’t great. The repeated use of certain tiles […]

Categories

## Rearrange a picture into another

I want to take one image, chop it into square tiles, and use those to make an approximation of another image. When the images are the same size, the simplest version is identical to the assignment problem. This is a classical optimization problem that has been well studied. In those terms, there is a “cost” […]

Categories

## Image Approximation with Constant-Color Shapes

I want to approximate images using constant-color shapes. Given a shape, how do we choose where to put it? We have the original image, , and the approximate image, . I want to place a shape, , with area on such that it improves the approximation. First, define the average color under the shape (which […]