i was reading up on some info about GPS and how it works.. and i came across something called trilateration, from what i understand its when you are given 3 or more points and distances from each of those points, you construct the circles using the distances as radius' and they all intersect at 1 point..

anyway, i tried that out on paper but i couldnt figure out a way to 'prove' that the method works.. ie.. i know you can SEE the intersection but how can you prove its there? (using math).. so i made a little program that basically just let me define 3 points and the distances and it would draw the circles and they would all intersect at 1 point..

im trying to figure out how i can calculate the x,y position of the intersection given only the 3 x,y points and the 3 radius'... im pretty sure this must be easy but for some reason i cannot figure it out :\

i tried looking for function that check for intersecting circles but no luck so far.. i tried intersecting rectangles instead but that didnt work out..

anyone know a formula or a function or something i can use to calculate the position?

thanks in advance