Calculating "o'clock" position
My maths is very rusty, so apologies for any bad terminology.
I'm working on some programming which involves describing places on a roughly circular map (if you're interested...) relative to the centre of it. I would like this description to read along the lines of "3 o'clock, 34% from centre" - this is to complement a function to search the map, and show the results in a way which can be understood by people with vision difficulties.
The map is an image file, and hence has co-ordinates starting from 0,0 in the top left. I've stored some meta data of the map which I feel will be useful - the co-ordinates of the middle of the circle, and the radius of it (large enough to encapsulate the whole map).
By subtracting the co-ordinates of a search result from the co-ordinates of the middle of the circle, I'm left with a set of co-ordinates relative to the middle of the circle - as if the circle was at 0,0 of a 2 axis graph which extends into the positive and negative.
This is where I'm stumped. I need to figure out what clock position (e.g. "3 o'clock") the search result is at, and how far from the centre it is - both of these will no doubt require the radius.
Any ideas or formulas to share?
Many thanks :)
For the sake of testing, here are the numbers:
Midpoint of map: 650, 635
Radius of circle: 715
Sample search result: 116, 824 (raw image co-ordinates) or -534, 189 (relative to midpoint of map)