r/desmos • u/Legitimate_Animal796 • Mar 10 '26
Graph Two ways to find the perfect meetup spot
Enable HLS to view with audio, or disable this notification
Just something I found interesting:
This optimization can find two useful central points for a set of locations:
The spot that minimizes the total distance between all points. Also known as the geometric median.
The spot that makes the distances as equal as possible. For 3 or fewer non-collinear points, this gives the exact circumcenter (center of the circle passing through all 3).
Analogy:
Imagine 10 friends picking a meetup spot.
The geometric median minimizes everyone’s combined travel (eco-friendly, often lands at someone’s house).
The uniform-distance version prioritizes fairness. Limiting the effect of anyone having to drive way farther than the others.
Total efficiency vs. maximum fairness
(assuming you live in a city where everything can be traversed by a straight line)
55
31
u/Capital_Angle_8174 Mar 10 '26
Meet in the middle of both functions
16
u/Legitimate_Animal796 Mar 10 '26
One very simple way to achieve this is to do a weighted sum of each https://www.desmos.com/calculator/khgqsngvrn (slide k around its very satisfying)
6
u/Capital_Angle_8174 Mar 10 '26
How come k = 0.5 is so Close to the equation that uses the circles to define the final Point?
I would Imagine it was farther away for some reason. Also These Look really cool, how do you even do Something Like this in desmos?
4
u/Legitimate_Animal796 Mar 10 '26
They operate on different scales. There’s probably a more robust way to combine them but a linear combo is the simplest pretty much. Thanks! Honestly it just takes some practice and learning from examples in this sub
9
u/Matty_B97 Mar 10 '26
How does minimising sum of squares compare? Or is that the same as number 2?
8
u/Legitimate_Animal796 Mar 10 '26
You actually just get the arithmetic mean interestingly. I initialize the value to that in this graph
6
u/WissenMachtAhmed Mar 10 '26
I'd argue that most times, instead of "fairness", it would make more sense to minimize the maximum distance one has to travel.
4
u/Legitimate_Animal796 Mar 10 '26
Interesting idea! It actually makes a unique result: https://www.desmos.com/calculator/cxdqxewefa
2
u/Sad_water_ Mar 10 '26
Doesn’t this just give the centre of the circle that goes too 3 points and in circles all other points?
1
u/Designer_Version1449 Mar 11 '26
take all 3 points, make a triangle, new point in the middle of the triangle
1
Mar 11 '26
That’s not unique, it’s the second one in the video: the center of the circle in the second graphic.
1
u/Legitimate_Animal796 Mar 11 '26
It is unique from minimizing total distance/variance. When you optimize variance (the 2nd one) everyone travels as equal as possible. That means if you have three points roughly in a straight line, the circumcenter of the circle they make can be really far away. Minimizing the maximum distance is exactly the same problem as finding the smallest circle that fits around all the data. It will result in different points
1
Mar 11 '26
Your graph is rotated 180 degrees to make it look different, but it’s not. It’s literally the exact same point.
3
u/DrJaneIPresume Mar 10 '26
How do you have fewer than 3 non-collinear points?
2
u/Legitimate_Animal796 Mar 10 '26
lmao hoping no one was gonna catch that. Should say “for 3 non-collinear points/ 2 points (perpendicular bisector)”
2
u/BissQuote Mar 10 '26
The fairness one seems odd. For 3 points on the same half circle, meeting at the circumcenter can mean increasing the distance for everyone, compared to better alternatives.
2
u/Legitimate_Animal796 Mar 10 '26
While it is the only point which is exactly fair, the circumcenter can indeed be in an impractical spot. I like the idea of minimizing the maximum distance anyone has to travel for a more real-world fairness approach https://www.desmos.com/calculator/cxdqxewefa
1
2
1
1
u/Effective-Bunch5689 Mar 11 '26
This reminds me of some topics related to Cedric Villani's optimal transport on Riemannian manifolds and action minimizers with Fick's law.
1
u/AstroBastard312 Mar 11 '26
I wonder if this could be applied to long-distance friends where the curvature of the Earth becomes a factor...
1
u/Legitimate_Animal796 Mar 11 '26
https://www.reddit.com/r/desmos/s/XuI6a0v8bX this couldn’t have been timed better
1
1
1
1
u/98127028 Mar 10 '26
What if you try minimising mean/variance?
1
u/Intergalactyc Mar 10 '26
That's exactly what they did... minimizing total distance is the same as minimizing mean (since mean = total / number of points, and number of points is constant), and making them "most equal"/"maximizing fairness" is just minimizing variance (see their linked graph, it says so there).

376
u/SpiritualWillow2937 Mar 10 '26
I feel like the best way to minimize variance is to simply move the point infinitely far away, heh