Caustics and Casinos on the I-5
An analytical analysis of an anomalous advertisement
Friday, January 4, 2019 · 7 min read
I was in Los Angeles over winter break, and on the long drive back home I began thinking about a billboard I saw just at the edge of the city advertising the “closest casino to anywhere in LA.”
This is a fascinating claim. Let me rephrase it, at least the way I interpret it: the claim is that wherever you are in LA, the closest casino is the one advertised on the billboard. (This is confusingly distinct from the claim that the casino is closest to anywhere in LA, in the sense that the placement of the casino minimizes the distance to the nearest bit of LA soil. Of course, practically speaking this latter claim is useless because any casino within LA trivially has the minimal distance of zero to “anywhere in LA.”)
The question is this: what region does the billboard’s claim imply is devoid of casinos?
Let’s start with a simple case to get some intuition. Suppose LA is a 15-mile-radius disk, and the casino is at the center of the disk. Then, according to the billboard, there must be no other casinos within LA’s 15-mile radius (otherwise, if you were in LA, you might be closer to that other casino!). But actually, the claim is quite a bit stronger: there cannot be any casinos within thirty miles of the center. Why? Well, suppose there was a casino 20 miles from the center of LA. Then, someone just within the city borders would be 5 miles away from that other casino, but 15 miles from the city-center casino.
One more simple case: suppose LA is a line segment of length 15 miles, and the casino is located at one endpoint. Can you imagine what the region in question must be? It is a disk of radius 15 miles, centered at the other endpoint! This is not entirely obvious, and you might need to draw a picture to convince yourself that this is true.
Now let’s consider a much trickier case: suppose LA is a circle again, but the casino is located along the circumference. Suddenly, it’s much harder to picture what’s going on — sitting in a car without pencil or paper, I had no idea what the region might look like. My instinct was “circle centered at the diametrically-opposite point on the circumference,” but it turns out that this is wrong!
In the rest of this post, we’ll build up some mathematical machinery to answer this question correctly. If you don’t want to work through the math, however, then feel free to just scroll to the red-bordered squares and enjoy the interactive demos.
Definition. Given some region , the casino closure with respect to some point is defined as
Or, informally: the casino closure is the set of possible casino locations such that there exists a person in the region who is closer to than to .
From here on out, I’m only going to worry about “nice” regions, i.e. closed, connected regions with smooth boundaries. I’m also going to use to range over points in , but really most math that follows is equally applicable in . It’s just harder to visualize.
Lemma. Let the disk be the set of all points in within of point . Then,
That is, we can construct by combining all the disks at all the points in that have on their circumference.
Proof sketch. This should make sense “by construction.” If point is in this constructed , then it lies in some disk , and thus the point that created disk fulfills the existence criterion of our definition.
Lemma. If region has a boundary , then .
Proof sketch. Clearly, if you believe the first lemma — adding more points to should only increase the union of disks.
The harder direction to show is . Consider some point . Extend the ray until it intersects with at point . Then, we can relate the disks created by and : . Why? Because the disk from is smaller and internally tangent to the disk from .
Mapping this argument over the entire union, it makes sense that .
Okay, time for some empirical verification of all this theory. Try drawing the boundary of a region (in black) here! The disks will show up in red. Notice how filling in your region with black dots doesn’t change the red blob at all. (Click to clear.)
The boundary-circle lemma gives us a nicer characterization of : it is the region bounded by the curve that is tangent to all of the disks created by the points on . It turns out that there is a very nice mathematical theory of “the curve that is tangent to all curves in a given family of curves,” and that is the theory of envelopes. The account below is paraphrased from “What is an Envelope?”, a lovely 1981 paper.
Let the function define a family of curves parameterized by , in the sense that defines a curve and defines another curve, and so on. Then, we seek to characterize the envelope curve which is tangent to every curve in .
Lemma. If the boundary of can be (periodically) parameterized as then the boundary of is the envelope with respect to of
Proof sketch. Again, this should make sense “by construction”: is chosen to correspond to circles centered at passing through .
Ah, but how do we find the envelope? Here we need a tiny bit of multivariable calculus.
Let be the parameterization of the envelope of . Then for all , we have that because the envelope must lie on the respective curve in the family (“tangent” means “touch”!). We also have that the curve must be parallel to the member of family at . We can then express this condition by saying that the gradient (with respect to of at is perpendicular to the derivative of at . Or:
In two dimensions, with , this equation manifests itself as .
The left hand side is oddly reminiscent of the multivariable chain rule. Indeed, if we took the partial derivative of our equation with respect to , we would get:
So we must have .
There is a simpler but less rigorous derivation if you believe that the envelope is exactly the points of intersection of infinitesimally close curves in the family . Then we want every point on the envelope to satisfy both and for some and some infinitesimal . Taking the limit as approaches zero gives the same condition that . The paper above discusses how this notion is subtly different in some strange cases, but it suffices to say that for all “nice” , we’re fine.
Almost-a-theorem. The boundary of is given by the parameterized vectors that satisfy and for the defined above.
Almost-a-proof-sketch. Almost! In general, the solution for might self-intersect, so we want to take only the “outermost” part of . But this is easy to work out on a case-by-case basis.
Example. Suppose is the unit disk centered at , and is located at the origin. Then and . We have
We also have
Solving these by eliminating is a simple exercise in polar coordinates. Discover from the second equation that , then recall that . The resulting boundary of is (almost!) the curve . In other words, it’s (almost!) a limaçon! As varies, the character of the limaçon varies, and at the critical points , we get a cardioid with a cusp. Beyond those critical points, the curve has an inner loop that we have to ignore; hence, “almost!”
Okay, time for more empiricism. Move your mouse around in the square below to see how the relative placement of LA and the casino affects the envelope. Notice also the inner loop predicted by the envelope, which we should of course ignore for the purposes of bounding .
An amazing fact is that a cardioid is the same shape you get on the surface of your coffee mug when you put it under a light! Well, not quite — it depends subtly on where the light source is. Read more about caustics at Chalkdust, from whom I also borrowed the image below:
Further reading: Wikipedia has great diagrams to accompany. Dan Kalman’s article “Solving the Ladder Problem on the Back of an Envelope.” includes a nice pedagogically-oriented discussion of envelope subtleties. It cites Courant’s Differential and Integral Calculus (vol 2), which is freely available on Archive.org.