Monthly Archives: December 2013

PaperJS Voronoi Diagrams

Image

I’ve been tinkering around with Voronoi diagrams, inspired by the example on the PaperJS site. My example (here) uses Raymond Hill’s Voronoi Javascript implementation and PaperJS to derive the diagram from a point distribution. Note: the redraw animation is a bit backwards, as the point locations are determined first, driving the placement of the Voronoi diagram.

Another, more festive example, can be found here, which shows the distribution of lights on our Christmas tree. Falalalala-la-la-la-la.

Refractometer: ABV Calculator

Image

I got a mysterious package in the mail yesterday – by the time I figured out that it was a Christmas present from my brother, it was too late.

Turns out the gift was a refractometer, a device used to measure an index of refraction, or how light gets bent going through another substance. Few people outside laboratories have much use for such a thing, but along the way some science-savvy beer brewer realized that you could measure the amount of dissolved sugar, and thus the amount of potential alcohol, in freshly brewed beer. By comparing the amount of sugar at the beginning and end of fermentation, you can infer the amount of alcohol by volume (ABV) in the finished beer.

Most homebrewers use a hydrometer in a similar manner, but this requires several chances of contamination (each time the wine-thief is filled, often several times) and wastes a good deal of beer along the way (about 100ml for each measurement). Refractometer measurements use a mere couple of drops which are collected only once per measurement.

Unfortunately, once alcohol is present in the liquid (i.e. any time after the initial measurement), it messes with the refraction measurement and a mathematical correction must be applied in order to compare the two samples. Using formulas from Northern Brewer, Primetab, Realbeer, I made an interactive calculator for calculating ABV from initial and final refractometer readings (in Brix units), and you can find it here. Drag the bars up and down to match your initial and final measurements.

Notes: there are tons of other online refractometer calculators, and I’ve seen some that use different formulas (or at least different coefficients), so beware. Also, if you’ve got Matlab, my brother made a library for charting and doing the calculations for yourself (blog post here).