Tuesday 25 June 2013

Need to teach PCR?

Need some high quality diagrams to explain polymerase chain reaction (PCR), designing primers, or some combo of both? You have come to the right place! There seemed to be a complete lack of high quality diagrams of primer sequences and the PCR cycle, so I drew some.


The primers. http://en.wikipedia.org/wiki/File:Primers_RevComp.svg



 Melting the template DNA. http://en.wikipedia.org/wiki/File:Primers_RevComp_Melted2.svg


Annealing of the primers. http://en.wikipedia.org/wiki/File:Primers_RevComp_Annealed2.svg


Elongation by DNA polymerase from the primers. http://en.wikipedia.org/wiki/File:Primers_RevComp_Elongation2.svg

These diagrams are all in scalable vector graphics (SVG) format and free for others to use and edit. Inkscape is a great, free, SVG editor, feel free to grab it and modify these images to your heart's content!

Software used:
Inkscape: Vector graphics

Thursday 20 June 2013

Sitting in a Pinhole Camera

Pinhole cameras are the simplest camera possible, made up of only a pinhole and a screen or film. They don't even need a lens. The camera works by line of sight and the fact that light essentially always travels in straight lines. For every point on the film there is a single line of sight, out through the pinhole, to a point in the world outside the camera. Only light from that point in the outside world can get through the pinhole and hit the film, which is the way in which the image is made. This simplicity means that you can make a pinhole camera incredibly easily. All that is needed is:
  1. A dark container or enclosure. 
  2. A small circular hole in one side of the container. 
  3. A screen or film to detect the light. 
The first two of these are easy to make at home, but the third isn't. Who has a spare piece of film and developing solutions? The [other] solution? Use a person to detect the light and see the image directly, or sketch it on the screen. The problem with people is they are pretty big, you can't squeeze one into a shoebox. Let's make a bigger pinhole camera then, one the size of a room. A room-sized container is easy to find, it's called a room!


A room sized pinhole camera!

The ability of a pinhole to project an image of a scene has been known for over 1000 years, and was first clearly described by the Persian philosopher Alhazen. These ancient scientists faced the same problem detecting light and initially used darkened rooms or tents with a pinhole in one side, then traced the image projected by the pinhole by hand. These devices are called camera obscura, the Latin literally meaning darkened room!

Turning a room into a pinhole camera takes just three easy steps:

1. The dark enclosure 
A pinhole camera container has to be light proof to prevent light leaking in and spoiling the image. The best thing for light proofing a room is aluminium foil which is very opaque for its weight and thickness. Foil tape is also excellent for blocking smaller gaps. 

2. The pinhole
There are a few rules for pinhole size; the bigger it is, the brighter the image. There is simply a larger gap for the light to get in. Unfortunately larger pinholes give a more blurred image because it increases the range of angles at which light can pass through the pinhole and hit a particular point on the film or screen. The pinhole also can't be too small else diffraction of light will start blurring the image. Practically for a room a "pinhole" around 1.5-2.0 cm in diameter will let in enough light to see the image clearly, but be small enough to give quite a sharp image.

3. The screen or film
In a room-sized pinhole camera you just need to sit in the room to see the image!

Foil blocked windows and a pinhole, the shaft of light is from the sun.

The image in a pinhole camera is inverted (upside down). This is because for light to reach the top of the film after travelling through the pinhole it has to be travelling at an upward angle; the line of sight through the pinhole means this is a view of the ground. Similarly for the light to reach the bottom of the film after travelling through the pinhole it has to be travelling at a downward angle, in this case giving a view of the sky. The upshot of this is that in a room sized pinhole camera the floor is a sea of clouds with an inverted picture of the world outside projected on the wall.


The pinhole image the right way up...

... and upside down. The same way up as the image.


You can literally sit in the clouds!


Software used:
UFRaw: Raw to jpg conversion of the raw camera files.

Friday 7 June 2013

Pretty Rubbish

Mikumi Zebra, through a polythene bag (and no, it's not photoshopped!).

Rubbish isn't normally viewed as pretty. A huge proportion of modern waste is plastic, and it is only recently that biodegradable plastics have become common, leaving a world filled with plastic waste. Plastic bags line trees, beaches are swamped with bottles. There is even a country sized patch of fragmented plastic waste floating in the middle of the Pacific ocean. Rubbish is not normally viewed as pretty because it simply isn't.

Coke Exhibit, through an Evian bottle.

Our eyes are pretty rubbish. They can only see light in a narrow range of wavelengths/frequencies (if our hearing was like or vision we would only be able to hear one octave) and can only detect wavelength and intensity. We just can't see other properties of the light, which includes phase and polarisation. Polarised light is all around us; if you have ever tried to look at an LCD screen while wearing polarising sunglasses or 3D glasses from the cinema you will have seen wierd effects. These happen purely because of the  polarisation of the light.

Oxford Narrowboats, through a ziplock bag.

Polarisation can make rubbish pretty. Plastics are made of long linear polymers and when plastic is stretched or stressed these line up and start interacting differently with light whose waves are traveling at different orientations. As polarised light is light whose waves travel at only one orientation this means it interacts strangely with plastics. Because our eyes can't see polarisation we don't normally notice this, but using tricks with polarised light to look at plastic we can reveal these effects. This can transform the appearance of rubbish.

Riverside Path, through a magazine wrapper.

Sadly pretty rubbish is a big PR statement. The spread of plastic waste is destroying pretty parts of the world, not just in appearance but though damage to ecosystems. The tragic case is that in the future the beauty of nature may be lost, preserved only through artificial images in artificial materials like plastics. Now that would be pretty rubbish.

 Iffley, through a tonic bottle.

You can explore the full set on Flickr.

Software used:
UFRaw: Raw to JPEG conversion.

None of these images are photoshopped in any way, they are 100% photo and could have been capture on a film camera. 

Thursday 6 June 2013

Laser Scanning a Room

Laser scanners are an amazing piece of tech which power everything from modern surveying to the self driving cars Google is developing. The way they work is surprisingly simple, they are actually just echo location, but using light.
  1. Point the laser at an object
  2. Send a pulse of laser light
  3. Measure the time the light takes to bounce back to the scanner
  4. Point at a new object and repeat
Most scan the whole of environment instead if just measuring the distance to single objects, and use a rotating scanner with a spinning mirror. 

So why don't the Google cars drive around dazzling people with lasers? Simple; they use infrared lasers instead. Near infrared has a wavelength of around 800nm and behaves just like the light we are used to. Imagine night vision not thermal vision. It is already common to use near infrared for communication using light that doesn't dazzle people, TV remote controls and mobile phone infra red ports use near infra red. 

This means, if Google's forecasts on the success of their self driving cars are to be believed, that in a few years time there will be a hidden world of laser scanning in action. Every time a Google self driving car goes past you will be scanned with infra red light. So what would that hidden world look like? 

I don't have a laser scanner, but I do have an infra red laser, an arm to wave it about with, an infra red camera, and perseverance. So let's fake a laser scan! 


This is what a room looks like when being scanned by a laser scanner (or at least a slightly wonky human imitation of one). Its not what a laser scanner sees, but what you could see if you could see in infra red and watched one in action. Pretty cool really. You can see the path the laser moves over as it scans, and the "shadow" of the scanner (ie. me!). You can just about make out the shape of the room, a coffee table and a sofa, by the way the path of the laser is distorted (some cheaper laser scanners actually measure this distortion to do the scan). 

So what about if there were multiple laser scanners in action together? Because they only look at a single point at any one time they wouldn't interfere with each other (unless they happened to try and scan the exact same point at the exact same time) so could all be on and working simultaneously. So here are two more fake scanning in action:





If these three scans were just piled on top of each other that would be pretty confusing to look at, so let's imagine that they use slightly different wavelengths (equivalent to colours) of light instead. 




This is the amazing result of having three (faked) and laser scanners in action at once. Pretty cool really. Even more scans starts to get messy, but the shape of the room really stands out. This is six scans combined with different colours for each.


Now imagine the future, a future where the infra red part of the spectrum starts getting busy as technology takes advantage of it. Picture a visible light photo of five self driving cars driving past a landmark. Basically just an advert for Google. Now picture the same thing, but in infra red. Now that could be a work of art.

For more images like this check out my Flickr set.

Geeky notes:
Laser scanners obviously aren't the only thing that lights up the near infra red part of the spectrum. The sun pumps out near infra red light which would swamp the scene with light, these photos will probably work better at night. Incandescent lights (ie. lights which aren't fluorescent, LED or energy saving), and anything else which is extremely hot (think flames and anything which glows red hot or hotter), also pump out infra red light. Fortunately as LED and fluorescent lights get more common the night time near infra red scene will get darker making the laser scanning pictures even more striking. On this topic this is why energy saving bulbs save energy, by producing less light at wavelengths that we can't see. 

Software used:
ImageJ: Photo handling and tweaking, composite image making.