Archive for the ‘Mathematics’ Category

Drawing geodesic curves using the Bing maps Silverlight control

Wednesday, 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

Geodesic

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:

  1. Generate the points of the curve in two dimensions using the parametric equation of a circle.
  2. 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.
  3. Project the transformed points back into 2D space using the Mercator projection equations.

(more…)

Reaction-Diffusion Models

Monday, March 23rd, 2009

maze.png

One of Alan Turing’s many contributions to mathematics and science during the 20th century was his 1952 paper on “The Chemical Basis of Morphogenesis” in which he suggested that a simple model of coupled differential equations could account for pattern formation in natural processes such as those found on animal coats. Such models are known as Reaction-Diffusion models, and take the following general form

\frac{\partial}{\partial t}\mathbf{q}=\mathbf{D}\nabla^2\mathbf{q}+\mathbf{R}(\mathbf{q})

(more…)

URM Emulator

Sunday, January 25th, 2009

The Unlimited Register Machine (URM), designed by Nigel Cutland, is an abstraction of a computer similar to the Turing Machine – but somewhat easier to get to grips with and more in tune with the operation of a modern computer processor.

It also happens to be the model used by the Open University’s course on Mathematical Logic and Number Theory, and is the reason for this article since I studied the course in 2007.

(more…)