Thursday, 9 May 2013

3D Lightning

Reddit is a great website, where the ability to share and discuss things on the web gives some great little discoveries. Things that would otherwise seem impossibly unlikely, like two people in completely different places getting a photo of the same lightning bolt, suddenly pop up all the time.

 Pic by chordnine

 Pic by Bobo1010

Having two pictures of the exact same lightning bolt lets you do something pretty amazing; reconstruct its path in 3D. In this case because the precise location and elevation of the photographers isn't known this is slightly more art than science, but it is still fun!

These are the two bolts, scaled to approximately the same size:

It is immediately clear that they are taken from about the same direction but different heights: the second bolt looks squashed vertically. This means the pair of images are roughly a stereo pair, but with a vertical shift instead of a horizontal. This is just like the pair of images you would see with your eyes if you had two eyes positioned vertically instead of horizontally on your head.

To analyse this the first step is to trace the lightning bolt, making sure that every point in one image matches up to the corresponding point in the other image, then record the coordinates of all the points. This gives a nice table of numbers where you can calculate the difference in x and y position in the two images.

Now we need to do some maths... except I don't like doing complicated maths and it turns out there is a big simplification you can make! If both pictures are taken from a long way away from the lightning bolt (i.e. the object has quite a small angular size in the image) then the shift in position between the images is proportional to the distance from the camera. Bigger shifts mean that bit of the bolt is closer to the camera. This approximation is pretty accurate for the majority of cameras, so I used it here.

The other problem is the proportionality factor. If one part of the lightning bolt shifts twice as much between the two images as another part that means it is twice as close. But twice as close as what? Without knowing exactly where the cameras were positioned that means only the relative distance, not absolute distance, can be calculated. Oh well, close enough!

So what does the lightning bolt look like in 3D? I plugged the coordinates into Blender and this is the result:

Pretty amazing really!

Software used:
ImageJ: Image analysis.
Blender: 3D modelling and rendering.

Friday, 3 May 2013


My Pebble arrived! It may be a one of the smartest watches around, but it is also shiny and curvaceous. Explore the curves and reflections in my macro photos in this flickr set....

 Software used:
ImageJ: Photograph animation
UFRaw: Raw extraction

Thursday, 2 May 2013


Each term I make a research comic for the Oxford University Biochemical Society magazine called Phenotype. This term's topic; cilia! These organelles can be found on a huge number of eukaryotic cells, ranging from nearly every cell in your body, to free living single cell microorganisms and protozoan parasites. The most famous function of cilia is swimming or moving a cell's surroundings, like the sperm flagellum (flagellum and cilium are different names for the same structure) or the cells in your lungs which help keep them clear of mucous.

Cilia are famous for their movement, but cilia are one of our the most multifunctional cell structures and have extremely important sensory and development functions. Can you guess which four if the five classic senses (touch, taste, smell, hearing, sight) need flagella to work?

This term's research comic feature in OUBS Phenotype is all about the diverse functions of cilia/flagella. Check out the comic here, or download the whole issue for free here.

Software used:
Autodesk Sketchbook Pro: Drawing the cells.
Inkscape: Page layout.