Have been scatching my head about this - and I reckon it's simple but my geometry/algebra is pretty rubbish, and I can't remember how to do this stuff from my school days!

EDITED:
I have a list of coordinates with people stood by them - I need an algorithm to order people from top left to bottom right in a list (array), and the second criteria demands that coordinates that are closer towards the top left origin take prescendance over all others - how would you do this? 

The code should show the order as:

1. Tom
2. Harry
3. Bob
4. Dave

See diagram below:

![alt text](https://rantincsharp.files.wordpress.com/2009/05/diagram.png)