June 30th, 2010
For an upcoming post I wanted to be able to plot the shortest routes between various positions on the Earth using the Bing Maps Silverlight control. Although since I started working on the problem Bing have provided a similar feature with their Distance Calculator App, the functions are not available for reuse via the public API. Interested developers may just want to skip the maths and just download the code.
Geodesic source code for Silverlight 4.0
Geodesics
The shortest path between two points on an arbitrary surface is called a Geodesic, and on a sphere, it is a Great Circle. Modelling the surface of the earth as a perfect sphere, the shortest distance between any two locations on the surface is then described by a section of a Great Circle, ie an arc that lies on the plane that is described by the vectors between its start and end points and the Earth’s centre ( see figure 1 ).
With this information, one way ( and the way I have adopted ) to plot such a curve is as follows:
- Generate the points of the curve in two dimensions using the parametric equation of a circle.
- Transform the plane of the 2d curve into 3D space such that it intersects the end points on the sphere, and the sphere’s centre.
- Project the transformed points back into 2D space using the Mercator projection equations.
Read the rest of this entry »
Posted in Mathematics, Software | 2 Comments »
April 29th, 2010
For the first time, the main Prime Ministerial candidates for the 2010 UK General Elections, will take part in three live debates. Since the BBC have kindly made the full transcripts available, I decided to have a go at analyzing the data and creating a visual representation in the form of word clouds. I am currently working on my own visualization software, but in the meantime these have been done using Wordle.
Read the rest of this entry »
Posted in Imaging, Software | No Comments »
March 24th, 2010
As 2010 is the 100th anniversary of the first published infra red photograph, I thought I’d try my hand using my own digital camera and some easily acquired accessories. If you want, you can skip the theory and go straight to the description of the method and a script for Photoshop.
A quick overview of IR photography
The CCD that is responsible for recording the images photographed by most digital cameras, is already sensitive to the near infra red part of the spectrum. That is, the part of the spectrum outside of the range visible to the human eye, but not so far as that used for, for example, thermal imaging. Since most photographers are not interested in light that they can’t see, this light is usually filtered out by an infra red cutoff filter placed inside the camera body, directly in front of the CCD. However, such filters are imperfect, so with some camera models by
combining a long exposure with an infra red transmitting filter placed in front of the lens, some of that IR light can be recovered. The figure shows the basic principle, though I should add that the graphs are just a sketch to illustrate the principle and don’t represent an actual CCD response curve.
Read the rest of this entry »
Posted in Imaging, Software | No Comments »
March 11th, 2010
I haven’t posted an opinion piece before, and I may be opening myself up to a whole world of pain by starting with this one, but this idea has been gathering momentum around the internet for a while now and I wanted to respond to it with a little more elucidation than that afforded by a tweet or a facebook flame war. For the record, I am not opposed to the Robin Hood Tax in the same way that I oppose Scientology or Jeremy Clarkson, but generally speaking it’s a good idea to be critical and to not take everything at face value.
Disclaimer : this is an opinion piece. I trust that people are capable of using Google to research the facts, though if you’re planning on using Wikipedia I should mention that this article has nothing to do with the film starring Kevin Costner or any episodes of Star Trek.
Read the rest of this entry »
Posted in Opinion | No Comments »