[Update]

Formula to get distance between two coordinate is as follow

**sqrt((x1 - x2)^2 + (y1 - y2)^2)**if i replace the values of x1,x2,y1,y2 it will look like

sqrt((3-4)^2 + (5-8)^2)

Now you can store all then point in a table with four column.And fetch the points from database and calculate the distance during run-time.

[/Update]

Is it about Ant colony optimization algorithms, http://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms?

--SA