Navigating Around Convex Sets
J. J. P. Veerman

TL;DR
This paper reviews fundamental convex analysis and geometry concepts to develop a differential equation for tracking the distance between an external observer and a convex set.
Contribution
It introduces a differential equation framework for measuring the distance to convex sets based on convex analysis principles.
Findings
Derived a differential equation for distance tracking
Connected convex geometry with dynamic distance measurement
Provided theoretical foundations for navigation around convex obstacles
Abstract
We review some basic results of convex analysis and geometry in in the context of formulating a differential equation to track the distance between an observer flying outside a convex set and itself.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Navigating Around Convex Sets
J. J. P. Veerman
Abstract
We review some basic results of convex analysis and geometry in in the context of formulating a differential equation to track the distance between an observer flying outside a convex set and itself.
1 Introduction.
Suppose you fly by a convex body in . A fundamental problem in convex analysis is to determine your distance to that body as you are flying. To the best of our knowledge, all standard algorithms to do this determine the point in the convex set nearest to you by optimization, at every point in time when needed or possible. In this exposition, we propose to solve the optimization problem only once, at , say, and then track by solving a differential equation for it. The study of this problem allows us to review some of the basic tenets of convex analysis.
Let be a closed (solid) convex body in and denote by by . The fly-by curve in is given by the trajectory , which we will always assume to be smooth. To find , we need to know the point in nearest to . This point is called the projection of onto and will be denoted by or for short. If we hope to write down a differential equation for , we will at least have to know the one-sided derivative of with respect to time:
[TABLE]
In Section 2 we give an elementary proof that if in , the boundary of is twice differentiable, then this one-sided derivative exists. In Section 3, we will see that this derivative exists for any piecewise linear polygon. Then we will outline the construction from [3] of a convex body in whose boundary is ( with a Lipschitz derivative) but for which does not exist (Theorem 1).
In Sections 4 and 5, the differential equations are constructed that allow us to continually monitor the distance to a convex body as we navigate around it. The general case is not much different from , so for ease of exposition we stick to . The construction is straightforward and employs the Weingarten equations (or Ricci curvature) from differential geometry. To the best of our knowledge, the final form of these equations (Theorem 17) is new. We invoke the existence and uniqueness theorems for the solutions of differential equations to show that if the boundary of is , then the system of differential equations has a unique solution. In Section 7, we give two examples of these equations and their solutions.
To the careful reader it will be clear that all we really need to formulate these differential equations are one-sided time derivatives (as in equation (1)). Thus if you fly near a convex body, you can change your course to another differentiable one, all the while continuing to monitor the distance. Thus the equations of Sections 4 and 5 can be used to avoid collision with a convex set. Hence our title. Even if is not convex, one could use these equations to avoid the convex hull of .
Finally, in Section 6, we discuss the classical, but still remarkable, fact that the function giving the distance of a point to the convex set is always differentiable (Theorem 3)! There is no regularity requirement at all on the convex set. Our exposition of this fact is inspired by [8].
The subject of distance to convex sets is much too rich to do justice to in this short introduction. But we do wish to point out a few directions in which considerable further research has been done. Our own interest (beside [3]) ultimately derives from a closely related problem, namely: Given a Riemannian manifold and two disjoint compact subsets and , what are the topological [4, 18] and geometric [11] characteristics of the set of points whose distance to equals their distance to ? Beside their intrinsic interest, these sets have many applications among others in the study of Brillouin zones in quantum mechanics [19].
The distance function to is not differentiable at . Indeed, at a point of , it behaves like the function near 0. For this reason one is also interested [1] in the smoothness of the signed distance, which is negative on one side of the surface and positive on the other. This obviously only works for embedded codimension one surfaces. Thus for more generality, one also studies the properties of . This is not formally a distance, but still closely related, and is differentiable at (see [1]).
There are many generalizations of the regularity of the distance function. In a smooth Riemannian manifold, or Alexandrov space, the notion of convexity may not be well-defined. So, instead of the derivative of the distance to a closed subset , one looks instead at its one-sided derivative along a geodesic with initial point :
[TABLE]
The generalization of Theorem 3 holds and states that this one-sided derivative always exists (see [15] and [5, Exercise 4.5.11]). Further differentiability beyond that depends on the smoothness of the subset (for example, [13, 14]). Other generalizations consider the distance to convex sets in Hilbert spaces (see [7, 17]).
2 Twice Differentiable Sets in .
It is convenient to use complex coordinates in . So, we identify with . We will assume that the boundary is a twice differentiable curve . We also assume that is a unit speed parametrization, that is, . We orient the boundary of counter-clockwise (see Figure 1).
The trajectory of a point outside the body depends on time and is given by
[TABLE]
so that in (outside the convex body), is positive. Note that we indicate differentiation with respect to time with a dot (for example, ), whereas differentiation with respect to the parameter of the convex body is indicated by an accent (for example, ).
[TABLE]
Now denote by and the components of parallel and orthogonal, respectively, to (derivative with respect to ). Since , we have that is orthogonal to , and thus is parallel to . Thus, equation (4) quite naturally splits into two components as described in the following lemma:
Lemma 1**.**
Suppose is twice differentiable and is a differentiable trajectory outside . We have
[TABLE]
Equation (3) implies that in the orientation of the parametrization sketched in Figure 1, is positive. Thus is parallel to , but actually points in the opposite direction. Because is the derivative of the projection, equation (5) proves the following lemma. This result generalizes to higher dimension (see Corollary 1).
Lemma 2**.**
If is twice differentiable, then ( in ).
3 A Counterexample.
If we drop the requirement that is twice differentiable, a set can be constructed where does not exist. We now give that construction, and outline the reason it works. Our treatment is loosely based on [3], which contains the full details.
One might be tempted to say that, of course, must be differentiable for to exist. But that would be wrong! Consider the set up on the left side of Figure 1, where is a straight line ( is constant). Consider the (shaded) cone in formed by the perpendiculars to the tangents of the surface at the nondifferentiable point. Before reaching the cone, is a constant determined by the angle between and the left flank of . As soon as hits the left boundary of the cone, because we are looking at the one-sided derivative (see equation (1)). Again, when hits the right boundary of the cone, the one-sided derivative is a nonzero constant. Clearly, the one-sided derivative exists for every piecewise linear polygon. In the light of this, it becomes nontrivial to find a counterexample to the existence of the one-sided derivative of the projection. A beautiful and surprisingly simple example of a nonempty closed continuous convex set for which the directional derivative of the metric projection mapping fails to exist was constructed by Shapiro in [16] and fine-tuned in [3] to become .
For some , define a sequence of real numbers by
[TABLE]
( is any positive real so that for all .) This set in [16] is the convex hull of the collection of points [math], , and . See the left part of Figure 2.
The right part of Figure 2 shows the figure modified by the techniques of [3], which is now . The construction is as follows. Let be the midpoint of the line segment and let be the point in the line segment such that
[TABLE]
Replace the two line segments and by a circular arc tangent to both segments. Define the convex set as the convex hull of all arcs and the arc of the unit circle in the lower half-plane connecting and . Clearly, the boundary of is differentiable, except at . This is easily remedied, but, since it is irrelevant for the remainder, we omit the details.
To continue, we first mention a curious result. The radius of curvature of the arcs is denoted by (see Figure 2). The radius of curvature by definition equals . The following lemma can be shown by any persistent reader, since it uses only elementary planar geometry. We omit the proof.
Lemma 3**.**
In the modified construction, exists and is equal to .
Let , the unit speed curve along the radius 2 circle centered at the origin. Near , we see that and . On the curve , mark the times where equals by , and times where equals by (see Figure 3). Again, using elementary planar geometry, the avid reader can prove the following lemma.
Lemma 4**.**
In the modified construction, the following limits exist:
[TABLE]
and both are in .
Theorem 1**.**
The modified construction just described yields a differentiable curve for the boundary of and is uniformly Lipschitz. The projection onto this set does not have a directional derivative at .
The remainder of this section is a sketch of the proof of Theorem 1.
Proof.
We first establish that the curve is differentiable and its derivative is uniformly Lipschitz. By construction, consists of circular arcs (and a part of the unit circle), and straight segments . So it is clear that is and almost everywhere. Where a segment and an arc are glued together, the derivative of is a continuous function which is constant on one side and has constant slope on the other. By Lemma 3, this slope is bounded, and so the derivative is uniformly Lipschitz.
The only problematic point is where the arcs accumulate. On the one hand, the line intersects only at . The points and are contained in . By convexity, the chords from to are contained in . The slope of these chords accumulate to the slope of . Hence, is the tangent line at . This establishes differentiability. With a little extra effort, the argument in the previous paragraph also applies to , establishing the Lipschitz condition there.
We next establish that the directional derivative of equation (1) does not exist near . If , then is part of a segment, and if , then by is in . Lemma 2 and Lemma 3 imply that for large (or near 0)
[TABLE]
This leads to the following equality:
[TABLE]
Now if we assume that the one-sided directional derivative exists and insert equation (7) and defined in Lemma 4 into the previous equation, then, as tends to infinity, we obtain
[TABLE]
It follows that or that . The latter is impossible by Lemma 4. Similarly, the equality
[TABLE]
under the hypothesis that exists, leads to the conclusion that . Thus we have a contradiction and, hence, cannot exist. ∎
There are two open questions related to this construction that are perhaps worth mentioning. The first is: Can this construction be modified to obtain a curve so that the quantity fails to exist in a set of points that is dense in some open subset of ? The second question is: Is there a curve in for which the solution of equation (14) is not unique? For such a curve, the one-sided derivative of the projection does exist by Lemma 1. But the solution of the differential equation would not be unique.
4 Twice Differentiable Sets in .
For the next two sections, we return to the smooth (at least ) case. It is interesting to translate the considerations in Section 2 to the vector space . For simplicity, we start with .
Recall that given by is the unit speed anti-clockwise parametrization of the boundary of the convex body. Denote its unit tangent vector by , and is the unit vector normal to it, pointed into the body (to get a right-handed coordinate system ). Note that in the complex notation becomes , and that the complex becomes . The sign of — nonnegative here — is determined by the convexity of the body. We now give the translations of equations (3) through (5) to .
The position of a point outside the body is given by
[TABLE]
(Note that is positive in .) Now let be a smooth curve. Differentiating with respect to while noting that , gives
[TABLE]
To write this in matrix form, define the matrix as having its first column equal to and its second equal to . Then
[TABLE]
Now is a unitary matrix (in fact, orthogonal) and so
[TABLE]
Inverting the matrices gives us the next lemma.
Lemma 5**.**
Suppose is twice differentiable and is a differentiable trajectory outside . We have
[TABLE]
where refers to the standard inner product in .
In practice, the unit speed parametrization is not so useful, since for most curves (including ellipses) explicit forms of such parametrizations are difficult or impossible find [10]. The method we use in Section 5 will avoid this problem altogether. For now, as a very simple illustration, consider the case where is the unit disk. Its circumference is parametrized by . The radius of curvature equals 1. Suppose ; then in this case the equations become
[TABLE]
We will look at more complicated examples in Section 7.
The assumption that is is essential here. The example of Section 3 shows that may not exist if the boundary is . The same holds in higher dimension (see Section 5), though we will not repeat this observation.
5 Twice Differentiable Sets in .
In three dimensions, these equations become much more interesting. The generalization from there to is easy to guess; one needs to replace the matrix below with the by Ricci curvature tensor of the hypersurface. We will stick to for simplicity.
Let be a smooth (at least ) parametrization of a surface in bounding a convex body . Denote by and by . To get a right-handed coordinate system , we define the unit normal :
[TABLE]
To connect with the earlier sections, we will set things up in such a way that points into the convex body . Let be the invertible matrix whose first column is , whose second column is , and whose third is . Note that the above assumptions imply that the determinant of this matrix is positive. Furthermore, let be the Weingarten matrix, that is (see [6]),
[TABLE]
The eigenvalues of are the principal curvatures of the surface (see [6]). By convexity — recall that points away from — these eigenvalues are nonnegative.
Theorem 2**.**
Suppose the parametrization of the boundary of is twice differentiable and is a differentiable trajectory outside . Let be the identity matrix. We have
[TABLE]
Proof.
Coordinatize , the space outside the convex body, as follows (see equation (10)):
[TABLE]
where in . Let be a smooth curve in , then
[TABLE]
where we have used equation (16). In matrix form, this gives
[TABLE]
Since the eigenvalues of are nonnegative and is positive in , this relation can be inverted to yield the theorem. ∎
Given the vector of the trajectory of the observer, the derivative of the projection is given by . Thus equation (17) implies the following.
Corollary 1**.**
If the surface in is twice differentiable, then the directional derivative exists.
For existence and uniqueness of the solution of this differential equation, the conditions of Theorem 17 are insufficient. We need to require that the right-hand side is Lipschitz in and continuous in (see [12]).
Corollary 2**.**
(Local) existence and uniqueness of the solution of differential equation (17) is guaranteed if is Lipschitz and is continuously differentiable.
Proof.
The continuity in of the right-hand side of equation (17) is guaranteed by the smoothness of . We now check the Lipschitz condition in . Lipschitz in is straightforward. Since is , is differentiable and invertible, and therefore so is . Hence, is certainly Lipschitz. The question then is whether is Lipschitz. The following computation shows that if is Lipschitz, then so is .
From the previous discussion, we are allowed to hold constant. Let us denote the operator norm by and set . Then
[TABLE]
The first and last term are at most 1 by convexity (the eigenvalues of are nonpositive). The middle term is Lipschitz by assumption. ∎
If we want the solution of equation (17) to depend differentiably on time and initial conditions, we need to require even more.
Proposition 1**.**
Let be the solution of equation (17) with initial condition at . Let an integer. If is and is , then is in .
Proof.
In [2, Chapter 32], it is proved that if and is for some integer , then the initial value problem is also . Inspection of equation (17) shows that the conditions of the proposition are sufficient to guarantee that its right-hand side is . ∎
6 Differentiability of the Distance Function.
If we restrict ourselves to the distance function, we can do much better for its regularity than the results in Section 5. In this section, we assume that is closed and convex, but make no further regularity assumption.
Lemma 6**.**
Suppose that is in and . Let . Then any convergent subsequence of converges to a point in .
Proof.
Suppose the opposite; then pick a subsequence of the so that is convergent to a point that is not in . Let ; then for some positive , we have . Now take arbitrarily small. Using the triangle inequality, we see that for large enough , and so
[TABLE]
On the other hand, using the triangle inequality for large again,
[TABLE]
Taking the two together, we get that , which contradicts the fact that minimizes the distance from to . ∎
If is convex, then is a single point . Thus every convergent subsequence of in the Lemma 6 must converge to that point. Since the are confined to a bounded portion of a closed set, they always have a convergent subsequence. Thus we have proved a nice corollary:
Corollary 3**.**
The projection is continuous.
For the remainder of this section, denote by the unit vector in the direction of .
Lemma 7**.**
For any and any vector , we have
[TABLE]
Proof.
The difference between the squares of the distances can be written using the standard inner product of :
[TABLE]
The left-hand side factors, so that we can divide by , from which the lemma follows easily. ∎
Lemma 8**.**
For any and any vector , we have
[TABLE]
Proof.
The computation is essentially the same as that in the proof of Lemma 7.
[TABLE]
As before, we divide by . ∎
In our case where is convex, Corollary 3 implies the second term in the right-hand side of the statement of Lemma 8 is also . This is important in the following theorem. (An altogether different proof of Theorem 3 can be found in [9, Chapter 2].)
Theorem 3**.**
For any and any vector , we have
[TABLE]
In other words, the distance function to a convex set in is differentiable on .
Proof.
We note that by definition of the projection , we have
[TABLE]
And thus by Lemma 7,
[TABLE]
Similarly, if we use Lemma 8 and Corollary 3 to make sure that , we obtain the reverse inequality
[TABLE]
∎
It turns out Lemma 7 actually holds not just in but in any Riemannian manifold (see [15]). The proof we gave of Lemma 8 is valid only in . The proof of Theorem 3 is a modified version of the proof that appeared in [8]. However, Theorem 3 also holds for Alexandrov spaces (a generalization of Riemannian manifolds) with nonpositive or nonnegative curvature, according to [5, Exercise 4.5.11].
7 Examples.
We close with a simple illustration of the equations discussed in Section 5. The situation is sketched in Figure 4. This example also illustrates the fact that straight lines in do not generally project to geodesics on the surface.
Let be the embedding of the cylinder of radius in . We choose a parametrization so that its orientation is consistent with that of the previous sections.
[TABLE]
For positive constants and let the trajectory be given by
[TABLE]
In the notation of Section 5, we calculate the matrix (whose first column is , the second, , and the third, ).
[TABLE]
The Weingarten matrix is computed as in equation (16):
[TABLE]
The projection of onto the cylinder together with its distance to the cylinder is thus given by the solution of equation (17), together with initial conditions. Noting that , these equations simplify to
[TABLE]
This somewhat obscure-looking nonlinear system nonetheless has a simple solution. Due to the translational symmetry, the segment from to its projection lies in the plane parallel to the -plane. Thus the distance and the angle can be found by inspection of Figure 4 on the left. We get
[TABLE]
where we have set . By inverting the second of these, we obtain its inverse . In the -plane, this solution is therefore a reparametrization of the curve . We have drawn this curve and the curve for in Figure 5.
We now turn to a slightly more challenging example. This time is the embedding of the ellipsoid of revolution in . We choose a parametrization so that its orientation is consistent with that of the previous sections. This includes making sure that the normal is pointing into the surface.
[TABLE]
Thus when , the ellipsoid looks a little like a cigar, as in Figure 6, and when , the ellipsoid is a flattened one.
With the same conventions as before, and following exactly the same procedure, we compute the matrix of tangent vectors and the Weingarten matrix :
[TABLE]
[TABLE]
After setting
[TABLE]
and some algebra, the equations of motion (17) become:
[TABLE]
Here is the a priori given trajectory.
As an example, we set and and numerically solved equation (19) setting the initial condition and . The results are displayed in Figure 7. The figure on the left shows the orbit of the projection for (the continuous curve) and the orbit (the dashed curve). We display only the coordinates; the radial coordinate is , so that the circles show where is constant (namely 0, , , and ) and the angular coordinate is ( equals the angle with the positive -axis indicated in the figure). The figure on the right shows the function . For clarity, we only show the function for .
These figures were produced with the Matlab routine ode45 with AbsTol and RelTol set to .
To be absolutely certain that the result is reliable, we recall that we should be able to recover from the solution of equation (19) as follows (see Section 5).
[TABLE]
For the displayed curve we found
[TABLE]
- ACKNOWLEDGMENT.
I am indebted to John Milnor for a very useful conversation which led to equation 4, and to Robert Lyons for the numerical results presented in Figure 7.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 11. Ambrosio, L., Mantegazza, C. (1998). Curvature and distance function from a manifold. J. Geom. Anal. 8(5): 723–748.
- 22. Arnold, V. I. (1992). Ordinary Differential Equations , 3rd ed. Heidelberg: Springer-Verlag.
- 33. Akmal, S. S., Mau Nam, N., Veerman, J. J. P. (2015). On a convex set with nondifferentiable metric projection. Optimization Letters . 9(6): 1039–1052.
- 44. Bernhard, J., Veerman, J. J. P. (2007). The Topology of Surface Mediatrices. Topology and Its Applications 154 (1): 54–68.
- 55. Burago, D., Burago, Y., Ivanov, S. (2001). A Course in Metric Geometry . Graduate Studies in Mathematics 33. Providence, RI: American Mathematical Society.
- 66. Do Carmo, M. P. (1976). Differential Geometry of Curves and Surfaces . Upper Saddle River, NJ: Prentice-Hall.
- 77. Fitzpatrick, S., Phelps, R. R. (1982). Differentiability of the metric projection in Hilbert space. Trans. AMS . 270: 483–501.
- 88. Foote, R. L. (1984). Regularity of the distance function. Proc. AMS. 92(1): 153–155.
