Thread: Rail deserts
View Single Post
  #22   Report Post  
Old November 1st 07, 04:26 PM posted to uk.transport.london
Clive D. W. Feather Clive D. W. Feather is offline
external usenet poster
 
First recorded activity at LondonBanter: Jul 2003
Posts: 856
Default Rail deserts

In article , Jarle H Knudsen
writes
1 for each grid cell
2 best := infinity
3 for each station on the list
4 d := (distance from station to cell) squared
5 if d best then best := d
6 cell value := sqrt (best)


Why does the distance need to be squared in line 4?


What is the formula for distance between two points on a Cartesian grid?

--
Clive D.W. Feather | Home:
Tel: +44 20 8495 6138 (work) | Web: http://www.davros.org
Fax: +44 870 051 9937 | Work:
Please reply to the Reply-To address, which is: