This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Planar Voronoi Diagrams for Sums of Convex Functions,
Smoothed Distance, and Dilation

Matthew Dickerson Department of Computer Science
Middlebury College
Middlebury, Vermont, USA
Email: dickerso@middlebury.edu
   David Eppstein Computer Science Department
University of California, Irvine
Irvine, California, USA
Email: eppstein@uci.edu
   Kevin A. Wortman Department of Computer Science
California State University, Fullerton
Fullerton, California, USA
Email: kwortman@fullerton.edu
Abstract

We study Voronoi diagrams for distance functions that add together two convex functions, each taking as its argument the difference between Cartesian coordinates of two planar points. When the functions do not grow too quickly, then the Voronoi diagram has linear complexity and can be constructed in near-linear randomized expected time. Additionally, the level sets of the distances from the sites form a family of pseudocircles in the plane, all cells in the Voronoi diagram are connected, and the set of bisectors separating any one cell in the diagram from each of the others forms an arrangement of pseudolines in the plane. We apply these results to the smoothed distance or biotope transform metric, a geometric analogue of the Jaccard distance whose Voronoi diagrams can be used to determine the dilation of a star network with a given hub. For sufficiently closely spaced points in the plane, the Voronoi diagram of smoothed distance has linear complexity and can be computed efficiently. We also experiment with a variant of Lloyd’s algorithm, adapted to smoothed distance, to find uniformly spaced point samples with exponentially decreasing density around a given point.

Index Terms:
biotope transform metric; convex function; dilation; Lloyd’s algorithm; pseudocircle; pseudoline; randomized algorithms smoothed distance; Voronoi diagram.

I Introduction

Any bivariate function ff and finite set of point sites pip_{i} in the plane give rise to a minimization diagram in which the cell for site pip_{i} consists of points qq such that the value of the translated function f(qpi)f(q-p_{i}) is less than or equal to the value of any of the other translates of ff. A familiar example is given by Euclidean Voronoi diagrams, the minimization diagrams of translates of the convex functions f(x,y)=x2+y2f(x,y)=\sqrt{x^{2}+y^{2}} (or, equivalently, f(x,y)=x2+y2f(x,y)=x^{2}+y^{2}) that measure the (squared) distance of (x,y)(x,y) from the origin.

Minimization diagrams have many applications, and typically have quadratic complexity [9], but in some important cases their complexity is much smaller. In a Euclidean Voronoi diagram, each cell is a convex polygon, so the Voronoi diagram for nn sites partitions the plane into nn connected regions and has O(n)O(n) vertices and edges. These combinatorial facts form the basis of efficient algorithms for constructing Euclidean Voronoi diagrams and using them in other geometric algorithms. It is natural, therefore, to ask: Which other minimization diagrams have connected cells and a linear number of number of features?

A partial answer was provided by Chew and Drysdale [1]: Voronoi diagrams for convex distance functions have connected cells and linear complexity. A convex function ff is a convex distance function if, for any positive scalar α\alpha and any point pp, f(αp)=αf(p)f(\alpha p)=\alpha\,f(p). Not every convex function has this property: it implies that the level sets {pf(p)=k}\{p\mid f(p)=k\} are all similar, and that the function is linear on rays from the origin, neither of which are true for all convex functions. Another answer is given by the abstract Voronoi diagrams [14] defined by a family of bisector curves that are required to intersect each other finitely many times and form simply connected cells. Bregman Voronoi diagrams [20] fall into this class: they have linear bisectors and convex-polygon cells. Abstract Voronoi diagrams may be constructed efficiently [14, 15, 19] but it is unclear how to tell whether a given convex function has minimization diagrams that form abstract Voronoi diagrams.

In this paper we study minimization diagrams for another class of convex functions, different from the convex distance functions. The functions we study take the form f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y), where gg and hh are triply-differentiable and g(x)g′′′(x)<g′′(x)2g^{\prime}(x)g^{\prime\prime\prime}(x)<g^{\prime\prime}(x)^{2} and h(y)h′′′(y)<h′′(y)2h^{\prime}(y)h^{\prime\prime\prime}(y)<h^{\prime\prime}(y)^{2} for all xx and yy. For example, squared Euclidean distance has this form with g(x)=x2g(x)=x^{2} and h(y)=y2h(y)=y^{2}. More generally, f(x,y)=|x|c+|y|cf(x,y)=|x|^{c}+|y|^{c} (for c>1c>1) satisfies these requirements,111The divergence of the double derivative of |x|c|x|^{c} at the origin when c<2c<2, and its non-differentiability there when 2<c<32<c<3, do not present any serious difficulties to our theory. and its minimization diagrams are the Voronoi diagrams for LcL_{c} distance, known to have linear complexity [1]. We show in Section III that the minimization diagrams of arbitrary functions in this class have analogous properties:

  • Any two level sets Sr(p)={qf(qp)=r}S_{r}(p)=\{q\mid f(q-p)=r\} are simple closed curves that intersect in at most two points; if they intersect at two points, they cross properly at these points. That is, these sets, which are defined analogously to Euclidean circles, form a family of pseudocircles [13, 16].

  • Any bisector B(p,q)={sf(sp)=f(sq)}B(p,q)=\{s\mid f(s-p)=f(s-q)\} forms either an axis-parallel line or a simple curve that is both xx-monotone and yy-monotone; f(sp)f(s-p) and f(sq)f(s-q) vary unimodally along the bisector B(p,q)B(p,q).

  • Any two bisectors B(p,q)B(p,q) and B(p,q)B(p,q^{\prime}) intersect in at most one point; if they intersect, they do so at a proper crossing. That is, if we fix pp and let qq vary, the bisectors B(p,q)B(p,q) form a weak pseudoline arrangement [6, 7, 3], and the correspondence between qq and B(p,q)B(p,q) can be viewed as a form of duality for these pseudolines.

  • Each cell of the minimization diagram is simply connected, as it is a single cell in a pseudoline arrangement. Thus, the minimization diagram has linear complexity and, like Voronoi diagrams for convex distance functions and abstract Voronoi diagrams,222We do not show that these diagrams satisfy all requirements of an abstract Voronoi diagram, as we do not bound the number of crossings between bisectors for unrelated pairs of points. can be constructed in randomized expected time O(nlogn)O(n\log n) (Theorem 8).

In Section IV we provide examples showing that our restrictions are necessary: minimization diagrams for more general convex functions do not in general have these properties.

Our motivation for studying this type of minimization diagram comes from smoothed distance. Given a fixed point oo in the plane, the smoothed distance or biotope transform metric do(p,q)=2d(p,q)/(d(p,o)+d(q,o)+d(p,q))d_{o}(p,q)=2d(p,q)/(d(p,o)+d(q,o)+d(p,q)) [2, DezDez-09] is a geometric analogue of the Jaccard similarity measure for clustering binary data. A maximal set of points with a given minimum smoothed distance will be distributed around oo with exponentially decreasing density [2], but as we show in Section VI, the point spacing may be improved by using smoothed distance in Lloyd’s algorithm [DuFabGun-SR-99, 17], a continuous variant of KK-means clustering that repeatedly moves each site to the centroid of its Voronoi cell.

Smoothed distance is a monotonic function of the dilation (d(p,o)+d(o,q))/d(p,q)(d(p,o)+d(o,q))/d(p,q), a measure of the quality of a star network as an approximation to the Euclidean distances among a set of points. For the maximum dilation pair of points (p,q)(p,q) from a set PP for a fixed center oo, qq is among the O(1)O(1) nearest neighbors to pp either in Euclidean distance or in the sequence of points sorted by distance from oo, and this result forms the basis of an efficient algorithm for finding the center oo that minimizes the maximum dilation [8] . However, this can be simplified using smoothed distance: the maximum-dilation pair must be neighbors in the smoothed distance Voronoi diagram (Proposition 1).

Neither smoothed distance nor dilation are translates of convex functions. However, in Section II we use complex logarithms to transform the plane and we perform a suitable monotonic transformation of smoothed distance, showing that Voronoi diagrams for smoothed distance are equivalent to minimization diagrams for the convex function

f(x,y)=ln(1+ex)2exln(1+cosy).f(x,y)=\ln\frac{(1+e^{x})^{2}}{e^{x}}-\ln(1+\cos y).

As we require, this function is the sum of univariate functions g(x)g(x) and h(y)h(y), with gg′′′<(g′′)2g^{\prime}g^{\prime\prime\prime}<(g^{\prime\prime})^{2}. It is not true that hh′′′<(h′′)2h^{\prime}h^{\prime\prime\prime}<(h^{\prime\prime})^{2} for all yy, but it is true for π/2<y<π/2-\pi/2<y<\pi/2, so smoothed distance Voronoi diagrams are well behaved whenever each Voronoi cell spans an angle of at most π/2\pi/2 on each side of its site with respect to oo (Theorem 9).

II Dilation, Smoothed Distance, and Logarithmic Transformation

Two important measures of similarity between sets AA and BB are the Hamming distance dH(A,B)=|AB|d_{H}(A,B)=|A\mathbin{\triangle}B| (where \mathbin{\triangle} denotes the symmetric difference of sets) and the Jaccard distance [12], which weights the Hamming distance by the size of the union of the sets:

J(A,B)=|AB||AB|=dH(A,B)dH(A,)+dH(B,)dH(A,B).J(A,B)=\frac{|A\mathbin{\triangle}B|}{|A\vee B|}=\frac{d_{H}(A,B)}{d_{H}(A,\emptyset)+d_{H}(B,\emptyset)-d_{H}(A,B)}.

A monotone transformation of this distance lies in the interval [0,1][0,1]:

dJ(A,B)=21J(A,B)+2=2dH(A,B)dH(A,)+dH(B,)+dH(A,B).d_{J}(A,B)=\frac{2}{\frac{1}{J(A,B)}+2}=\frac{2d_{H}(A,B)}{d_{H}(A,\emptyset)+d_{H}(B,\emptyset)+d_{H}(A,B)}.

The same formula defining the (modified) Jaccard distance in terms of the Hamming distance can be used to derive a new metric from any given metric space (X,d)(X,d) and fixed point oXo\in X. Define the oo-smoothed distance or biotope transform metric by the formula

do(p,q)=2d(p,q)d(p,o)+d(q,o)+d(p,q).d_{o}(p,q)=\frac{2d(p,q)}{d(p,o)+d(q,o)+d(p,q)}.

This is a metric on X{o}X\setminus\{o\}, as can be shown using the tight span [11, 4], the minimal LL_{\infty}-like metric completion of a metric space. Any four points {o,p,q,r}(X,d)\{o,p,q,r\}\subset(X,d) may be embedded isometrically into a metric space formed by an axis-aligned rectangle of the L1L_{1} plane (possibly a degenerate rectangle), together with four line segments (possibly of length zero) connecting the corners of this rectangle to the four points. When the four line segments all have length zero, the four points are in cyclic order (oo, pp, rr, qq) on the rectangle’s corners, and the rectangle has aspect ratio aa, then the triangle inequality for dod_{o} is satisfied exactly: do(p,q)=1=1a+1+aa+1=do(p,r)+do(q,r)d_{o}(p,q)=1=\frac{1}{a+1}+\frac{a}{a+1}=d_{o}(p,r)+d_{o}(q,r). Increasing the length of the line segments connecting the four points to the rectangle or placing the points in a different cyclic order only strengthens the triangle inequality.

For the points within a dd-ball of radius ϵd(o,c)\epsilon\,d(o,c) around a point cc, the factor d(p,o)+d(q,o)+d(p,q)d(p,o)+d(q,o)+d(p,q) in the definition of dod_{o} ranges from (1ϵ)2d(o,c)(1-\epsilon)2d(o,c) to (1+2ϵ)2d(o,c)(1+2\epsilon)2d(o,c), varying by a factor of approximately 1+3ϵ1+3\epsilon within this range as ϵ\epsilon approaches zero. Thus, closely spaced sets of points in the smoothed distance have distances that are approximately similar to their unsmoothed distances. As a metric space on X{o}X\setminus\{o\}, the smoothed distance dod_{o} is topologically equivalent to the metric induced by dd on the same space: both distances have the same open sets and neighborhood structures.

Smoothed distance dod_{o} for the Euclidean plane is invariant with respect to rotations and scaling centered at oo. These transformations may be expressed by representing point (x,y)(x,y) as the complex number x+iyx+iy, with o=0o=0: if zz is any complex number, then the product zpzp may be interpreted geometrically as rotating the point pp by the angle z01\angle z01 and scaling the rotated point by |z||z|. With this interpretation,

Refer to caption
Figure 1: Concentric circles for smoothed distance in the Euclidean plane, with o=(0,0)o=(0,0), p=(1,0)p=(1,0), and radii 0.5, 0.6, 0.7, 0.8, and 0.9

do(zp,zq)=do(p,q)d_{o}(zp,zq)=d_{o}(p,q).

As Figure 1 shows, smoothed-distance circles with smaller radius closely resemble Euclidean circles, while larger-radius smoothed-distance circles are not even convex.

Smoothed distance is closely related to dilation, a measure of the quality of a graph as an approximation to a metric space [5]. The dilation of vertices pp and qq is the ratio of their distances in the graph and in the ambient space; the dilation of the graph is the largest dilation of any pair of vertices. For a star graph GG with center oo and all other vertices as leaves [8], the dilation of pair (p,q)(p,q) is

d(p,o)+d(o,q)d(p,q)=2do(p,q)1\frac{d(p,o)+d(o,q)}{d(p,q)}=\frac{2}{d_{o}(p,q)}-1

and the dilation of the whole star graph is

maxp,qV(G)d(p,o)+d(o,q)d(p,q)=maxp,qV(G)2do(p,q)1.\max_{p,q\in V(G)}\frac{d(p,o)+d(o,q)}{d(p,q)}=\max_{p,q\in V(G)}\frac{2}{d_{o}(p,q)}-1.

Because dilation is a monotonic transformation of smoothed distance, the point pp that is nearest to a query point qq in terms of smoothed distance is also the point that has the greatest dilation with qq. The Voronoi diagram for smoothed distance partitions the plane into regions such that the region containing a query point qq corresponds to the point pp for which a path from qq will have to make the greatest detour by passing through oo instead of connecting directly. The adjacency relations between cells in this Voronoi diagram are also meaningful for dilation:

Proposition 1

The points pp and qq defining the dilation of a star graph have adjacent cells in the Voronoi diagram for smoothed distance, using the star’s leaves as Voronoi sites and its hub as the point oo.

Proof:

Form the Voronoi diagram for V(G){q}V(G)\setminus\{q\} and then add qq to form the Voronoi diagram of V(G)V(G). Let RR be the Voronoi region of pp prior to adding qq. RR must contain qq, because otherwise some other point than pp would define the greatest dilation with respect to qq. After adding qq, part of RR becomes incorporated into the Voronoi region for qq, while the rest of RR (in particular the point pp itself) remains in the region of pp. Thus, these two regions meet. ∎

Thus, we would like to understand and compute Voronoi diagrams for smoothed distance. Smoothed distance is neither convex nor translation-invariant, but we can transform it into an equivalent distance that is, by interpreting polar coordinates in the plane for which we are computing smoothed distance as Cartesian coordinates in a transformed plane. Equivalently, using complex numbers (with o=0o=0), if complex number zz has polar coordinates (r,θ)(r,\theta), then lnz\ln z has Cartesian coordinates (lnr,θ)(\ln r,\theta). Define a distance δ\delta on the transformed complex number plane by the formula

δ(p,q)=do(ep,eq).\delta(p,q)=d_{o}(e^{p},e^{q}).

This logarithmic transformation replaces the invariance of dod_{o} under complex multiplication by invariance of δ\delta under complex addition (that is, translation of the plane):

δ(p+z,q+z)=δ(p,q).\delta(p+z,q+z)=\delta(p,q).

Figure 2 shows concentric circles for δ\delta.

Refer to caption
Figure 2: Concentric circles for the logarithmically transformed distance δ\delta with radii 0.5, 0.75, 0.9, 0.99, and 0.999.

We may calculate δ((x,y),(0,0))\delta((x,y),(0,0)) directly as a formula of xx and yy: it equals do(p,q)d_{o}(p,q), where o=(0,0)o=(0,0), p=(excosy,exsiny)p=(e^{x}\cos y,e^{x}\sin y), and q=(1,0)q=(1,0). Thus, d(p,o)=exd(p,o)=e^{x}, d(q,o)=1d(q,o)=1, and

d(p,q)\displaystyle d(p,q) =\displaystyle= (excosy1)2+(exsiny)2)\displaystyle\sqrt{(e^{x}\cos y-1)^{2}+(e^{x}\sin y)^{2})}
=\displaystyle= (ex)22excosy+1.\displaystyle\sqrt{(e^{x})^{2}-2e^{x}\cos y+1}.

Therefore, the smoothed distance is

do(p,q)\displaystyle d_{o}(p,q) =\displaystyle= 2d(p,q)d(p,o)+d(q,o)+d(p,q)\displaystyle\frac{2d(p,q)}{d(p,o)+d(q,o)+d(p,q)}
=\displaystyle= 2(ex)22excosy+1ex+1+(ex)22excosy+1.\displaystyle\frac{2\sqrt{(e^{x})^{2}-2e^{x}\cos y+1}}{e^{x}+1+\sqrt{(e^{x})^{2}-2e^{x}\cos y+1}}.

It is convenient to monotonically transform this formula:

(2do(p,q)1)2=(ex)2+2ex+1(ex)22excosy+1\left(\frac{2}{d_{o}(p,q)}-1\right)^{2}=\frac{(e^{x})^{2}+2e^{x}+1}{(e^{x})^{2}-2e^{x}\cos y+1}

and

12(11/(2do(p,q)1)2)=(cosy+1)ex(ex)2+2ex+1.\frac{1}{2}\left(1-1/\left(\frac{2}{d_{o}(p,q)}-1\right)^{2}\right)=\frac{(\cos y+1)e^{x}}{(e^{x})^{2}+2e^{x}+1}.

Therefore, if we define

f(x,y)=ln(12(11/(2do(p,q)1)2)),f(x,y)=-\ln\left(\frac{1}{2}\left(1-1/\left(\frac{2}{d_{o}(p,q)}-1\right)^{2}\right)\right),

it follows that

f(x,y)=ln(1+ex)2exln(cosy+1).f(x,y)=\ln\frac{(1+e^{x})^{2}}{e^{x}}-\ln(\cos y+1).

Thus, we have represented smoothed distance as a monotonic transform of translates of f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y), where

g(x)=ln(1+ex)2ex and h(y)=ln(cosy+1).g(x)=\ln\frac{(1+e^{x})^{2}}{e^{x}}\mbox{~~and~~}h(y)=-\ln(\cos y+1).

Graphs of these two functions are depicted in Figure 3.

Refer to caption
Refer to caption
Figure 3: Graphs of the functions g(x)g(x) and h(y)h(y) used to represent the transformed value of the smoothed distance.

III Minimization Diagrams of Convex Functions

The transformation in Section II from a Voronoi diagram of smoothed distance to a minimization diagram of translates of f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) motivates the more general study of minimization diagrams of this type of function. A univariate function f:f:\mathbb{R}\mapsto\mathbb{R} is convex if the set of points

{(x,y)yf(x)}\{(x,y)\mid y\geq f(x)\}

on or above f(x)f(x) is a convex subset of the plane. In higher dimensions, a multivariate function f:df:\mathbb{R}^{d}\mapsto\mathbb{R} is convex if the set

{(x0,x1,x2,xd)f(x0,x1,x2,xd1)xd}\bigl{\{}(x_{0},x_{1},x_{2},\dots x_{d})\mid f(x_{0},x_{1},x_{2},\dots x_{d-1})\leq x_{d}\bigr{\}}

is a convex subset of d+1\mathbb{R}^{d+1}. A convex univariate function is strictly convex if there is no interval within which it is linear. For a doubly-differentiable univariate function g(x)g(x), convexity is equivalent to the inequality g′′0g^{\prime\prime}\geq 0 and strict convexity is equivalent to the inequality g′′>0g^{\prime\prime}>0. A curve in the (x,y)(x,y)-plane is xx-monotone if every line parallel to the yy axis intersects it in at most one point; intuitively, these curves are the graphs of functions from xx to yy. Symmetrically, a curve is yy-monotone if every line parallel to the xx axis intersects it in at most one point. These concepts should be distinguished from that of a function being monotonically increasing or strictly monotonically increasing: if x1>x0x_{1}>x_{0}, and ϕ(x)\phi(x) is monotonically increasing, then ϕ(x1)ϕ(x0)\phi(x_{1})\geq\phi(x_{0}); if ϕ(x)\phi(x) is strictly monotonically increasing, then ϕ(x1)>ϕ(x0)\phi(x_{1})>\phi(x_{0}). In a minimization diagram of translates of a function f(x,y)f(x,y), a bisector B(p,q)B(p,q) of two distinct points pp and qq is the locus of points with equal values of fpf_{p} and fqf_{q}: B(p,q)={rfp(r)=fq(r)}B(p,q)=\{r\mid f_{p}(r)=f_{q}(r)\}. The minimization diagram of the points {p,q}\{p,q\} is formed by partitioning the plane into two cells along the bisector.

Proposition 2

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y), where gg and hh are strictly convex. Then any bisector B(p,q)B(p,q) is either an axis-parallel line or an xx-monotone and yy-monotone curve.

Proof:

If pp and qq have equal xx-coordinates, then fp(r)=fq(r)f_{p}(r)=f_{q}(r) whenever h(rypy)=h(ryqy)h(r_{y}-p_{y})=h(r_{y}-q_{y}); since this condition is independent of xx, the bisector must be the union of one or more lines parallel to the yy axis. Otherwise, any line x=Cx=C parallel to the yy axis intersects the bisector B(p,q)B(p,q) in the points rr such that h(rypy)h(ryqy)=g(Cqx)g(Cpx)h(r_{y}-p_{y})-h(r_{y}-q_{y})=g(C-q_{x})-g(C-p_{x}). By strict convexity, the function H(y)=h(rypy)h(ryqy)H(y)=h(r_{y}-p_{y})-h(r_{y}-q_{y}) is strictly monotonically increasing, so there is at most one such point and the bisector is xx-monotone. Symmetrically, if pp and qq have the same yy-coordinate, the bisector must be the union of one or more lines parallel to the xx axis, and otherwise it is yy-monotone. The only curves that are simultaneously xx-monotone or a union of yy-parallel lines, and yy-monotone or a union of xx-parallel lines, are the ones listed in the proposition: a single axis-parallel line, or a doubly-monotone curve. ∎

In particular, each bisector must be a pseudoline (the image of a line under a homeomorphism of the plane333This definition is from [21]; see [7] for a comparison with other common definitions of pseudolines.), because it is either itself a line or a monotonic curve that partitions the plane into two cells. In the next sequence of lemmas, we show that the level sets of the translates of ff are pseudocircles (simple closed curves that cross each other at most twice) by comparing their curvatures at tangent points of the same slope. For convenience, when the argument of the functions g(x)g(x) and h(y)h(y) is specified in the context, the notations gg, hh, gg^{\prime}, hh^{\prime}, etc., refer to the values g(x)g(x), h(y)h(y), ddxg(x)\frac{d}{dx}g(x), ddyh(y)\frac{d}{dy}h(y), etc.

Lemma 3

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) where gg and hh are convex and differentiable. Let p=(xp,yp)p=(x_{p},y_{p}) be any point other than the global minimum of ff, let f(p)=rf(p)=r, and let SrS_{r} be the level set {qf(q)=r}\{q\mid f(q)=r\}. Then the slope of the tangent to SrS_{r} at pp is h/g-h^{\prime}/g^{\prime}.

Proof:

Since pp is not the minimum, SrS_{r} is a simple closed curve. Therefore there is a unique tangent line which is characterized by the fact that, at points qq on the line at a small distance ϵ\epsilon from pp, the difference between f(p)f(p) and f(q)f(q) vanishes to first order. A point qq at a distance proportional to ϵ\epsilon on the line of slope h/g-h^{\prime}/g^{\prime} can be found by adding (hϵ,gϵ)(-h^{\prime}\epsilon,g^{\prime}\epsilon) to pp; at this point, f(q)f(q) is f(p)+(hϵ)(g+O(ϵ))+(gϵ)(h+O(ϵ))=f(p)+O(ϵ2)f(p)+(-h^{\prime}\epsilon)(g^{\prime}+O(\epsilon))+(g^{\prime}\epsilon)(h^{\prime}+O(\epsilon))=f(p)+O(\epsilon^{2}), so the difference vanishes to first order as desired. ∎

Next, suppose we move ϵ\epsilon units along the curve SrS_{r} from pp; to within first order, the point we move to is found by adding (ϵhh2+g2,ϵgg2+h2)(\epsilon\frac{-h^{\prime}}{\sqrt{h^{\prime 2}+g^{\prime 2}}},\epsilon\frac{g^{\prime}}{\sqrt{g^{\prime 2}+h^{\prime 2}}}) to pp. When we do so, gg^{\prime} changes by a factor of 1ϵg′′hgg2+h2+O(ϵ2)1-\epsilon\frac{g^{\prime\prime}h^{\prime}}{g^{\prime}\sqrt{g^{\prime 2}+h^{\prime 2}}}+O(\epsilon^{2}), and hh^{\prime} changes by a factor of 1+ϵgh′′hg2+h2+O(ϵ2)1+\epsilon\frac{g^{\prime}h^{\prime\prime}}{h^{\prime}\sqrt{g^{\prime 2}+h^{\prime 2}}}+O(\epsilon^{2}), so the slope h/gh^{\prime}/g^{\prime} changes by a factor of 1+ϵgh′′/h+hg′′/gg2+h2+O(ϵ2)1+\epsilon\frac{g^{\prime}h^{\prime\prime}/h^{\prime}+h^{\prime}g^{\prime\prime}/g^{\prime}}{\sqrt{g^{\prime 2}+h^{\prime 2}}}+O(\epsilon^{2}). We may view the term gh′′/h+hg′′/gg2+h2\frac{g^{\prime}h^{\prime\prime}/h^{\prime}+h^{\prime}g^{\prime\prime}/g^{\prime}}{\sqrt{g^{\prime 2}+h^{\prime 2}}} appearing in this expression as a local measure of the curvature of SrS_{r}; it is not rotation-invariant but can be used to compare the curvatures of two curves at points of equal tangent slope. Larger values of this term mean a smaller radius of curvature and lower values mean a greater radius. To show that the radius of curvature at a given slope increases as rr increases, we will examine the behavior of this function as we increase rr by a small quantity ϵ\epsilon while moving pp along a curve that keeps the slope of the tangent to SrS_{r} fixed.

Lemma 4

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) where gg and hh are convex and twice-differentiable. At any point pp for which g,h0g^{\prime},h^{\prime}\neq 0, define the curve TpT_{p} through pp to consist of points with the same value of h/g-h^{\prime}/g^{\prime} as at pp. Then the tangent line to TpT_{p} at pp has slope h′′h/g′′g\frac{h^{\prime\prime}}{h^{\prime}}/\frac{g^{\prime\prime}}{g^{\prime}}.

Proof:

Move pp by a distance proportional to some small ϵ\epsilon along this line, by adding the vector (ϵh′′h,ϵg′′g)(\epsilon\frac{h^{\prime\prime}}{h^{\prime}},\epsilon\frac{g^{\prime\prime}}{g^{\prime}}) to pp. As pp moves, gg^{\prime} and hh^{\prime} both change by factors of 1+ϵg′′h′′gh+O(ϵ2)1+\epsilon\frac{g^{\prime\prime}h^{\prime\prime}}{g^{\prime}h^{\prime}}+O(\epsilon^{2}). Both factors are equal to within first order, so the slope h/g-h^{\prime}/g^{\prime} does not change to first order and we have identified the correct tangent line to TpT_{p}. ∎

Lemma 5

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) where gg and hh are convex and triply-differentiable, and where g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2} and h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2} for all xx and yy. Then, along any curve TpT_{p}, the radius of curvature of the curves SrS_{r} at the points where these curves are crossed by TpT_{p} is a monotonically increasing function of f(p)f(p).

Proof:

We assume without loss of generality that gg, hh, gg^{\prime}, and hh^{\prime} are all positive at pp, for otherwise we may achieve these assumptions by translating the plane, reflecting it across one or both of the coordinate axes, or adding a constant to ff, without changing the truth of the lemma. As in the previous lemma, we move at a distance proportional to ϵ\epsilon along TpT_{p}, to within first order, by adding (ϵh′′h,ϵg′′g)(\epsilon\frac{h^{\prime\prime}}{h^{\prime}},\epsilon\frac{g^{\prime\prime}}{g^{\prime}}) to pp. And as in the previous lemma, this motion causes gg^{\prime} and hh^{\prime} to both change by a factor of 1+ϵg′′h′′gh+O(ϵ2)1+\epsilon\frac{g^{\prime\prime}h^{\prime\prime}}{g^{\prime}h^{\prime}}+O(\epsilon^{2}); this same factor also describes the change in g2+h2\sqrt{g^{\prime 2}+h^{\prime 2}}. Thus, to find the direction of change to the value gh′′/h+hg′′/gg2+h2\frac{g^{\prime}h^{\prime\prime}/h^{\prime}+h^{\prime}g^{\prime\prime}/g^{\prime}}{\sqrt{g^{\prime 2}+h^{\prime 2}}} that we are using to compare curvatures for a given tangent slope, it only remains to evaluate the change to g′′g^{\prime\prime} and h′′h^{\prime\prime}. The double derivative g′′g^{\prime\prime}, and therefore the term hg′′/gh^{\prime}g^{\prime\prime}/g^{\prime} appearing in the numerator of our local curvature function, changes by a factor of 1+ϵg′′′h′′g′′h+O(ϵ2)1+\epsilon\frac{g^{\prime\prime\prime}h^{\prime\prime}}{g^{\prime\prime}h^{\prime}}+O(\epsilon^{2}); if g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2}, this is smaller than the factor of 1+ϵg′′h′′gh+O(ϵ2)1+\epsilon\frac{g^{\prime\prime}h^{\prime\prime}}{g^{\prime}h^{\prime}}+O(\epsilon^{2}) describing the change to the denominator of our local curvature function. The double derivative h′′h^{\prime\prime}, and therefore the term gh′′/hg^{\prime}h^{\prime\prime}/h^{\prime} appearing in the numerator of our local curvature function, changes by a factor of 1+ϵg′′h′′′gh′′+O(ϵ2)1+\epsilon\frac{g^{\prime\prime}h^{\prime\prime\prime}}{g^{\prime}h^{\prime\prime}}+O(\epsilon^{2}); again, if h′′′h<(h′′)2)h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2}), this is smaller than the factor of 1+ϵg′′h′′gh+O(ϵ2)1+\epsilon\frac{g^{\prime\prime}h^{\prime\prime}}{g^{\prime}h^{\prime}}+O(\epsilon^{2}) describing the change to the denominator of our local curvature function. Thus, if the assumptions of the lemma are met, gh′′/h+hg′′/gg2+h2\frac{g^{\prime}h^{\prime\prime}/h^{\prime}+h^{\prime}g^{\prime\prime}/g^{\prime}}{\sqrt{g^{\prime 2}+h^{\prime 2}}} decreases and the radius of curvature increases as f(p)f(p) increases along TpT_{p}. ∎

Due to the convexity of ff, and the strict convexity of gg and hh, the level sets Sr(p)={qfp(q)=r}S_{r}(p)=\{q\mid f_{p}(q)=r\} are themselves convex; in particular, they are simple closed curves in the plane and, as the following proposition shows, they form a family of pseudocircles in the plane.

Proposition 6

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) be a convex function such that gg and hh are triply-differentiable, g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2}, and h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2}, and let r1r_{1} and r2r_{2} be numbers and p1p_{1} and p2p_{2} be points such that (r1,p1)(r2,p2)(r_{1},p_{1})\neq(r_{2},p_{2}). Then the level sets Sri(pi)S_{r_{i}}(p_{i}) intersect in at most two points; if they intersect at two points, they cross properly at these points.

Proof:

We suppose that a pair that forms more than two points of intersection or that has two non-crossing intersections exists, and proceed to derive a contradiction. If there are exactly two points of intersection, one of which is not a crossing, then (because both are simple closed curves) both must be points of tangency; we may increase the radius of the inner level set slightly and form two level sets that cross four times, so we may assume without loss of generality that there are three or more points of intersection. If r1=r2r_{1}=r_{2}, then again we may change one of the radii slightly while preserving the property of having more than two points of intersection, for this change of radii cannot remove any crossings and can be chosen to turn at least half of the points of tangency into pairs of crossings. And if some of the points of intersection are tangencies, we may increase or decrease r1r_{1} by a small amount and replace at least half of the tangencies by crossings without changing the property that there are more than two intersection points. Thus, we may assume that the two level sets intersect more than two times at proper crossings.

Now, let TT be the set of real numbers x>1x>1 such that Sr1(p1)S_{r_{1}}(p_{1}) and Sr2(xp2+(1x)p1)S_{r_{2}}(xp_{2}+(1-x)p_{1}) have more than two proper crossings; that is, we consider translating p2p_{2} directly away from p1p_{1} for as far as we can while preserving the overly large number of crossings between the two curves. Because both level sets are bounded, II is itself bounded; let t=supTt=\sup T and let p3=tp2+(1t)p1p_{3}=tp_{2}+(1-t)p_{1}. In order for the translated level sets to have more than two crossings for x<tx<t but only to have two crossings for x>tx>t, the sets Sr1(p1)S_{r_{1}}(p_{1}) and Sr2(p3)S_{r_{2}}(p_{3}) must be tangent. However, this point of tangency cannot be one at which the two level sets cross, because our assumptions imply that both curves have curvature that varies continuously along the curves. It cannot be a tangency in which the curve with the smaller value of rir_{i} lies inside the curve with the larger value of rir_{i}, because then for x>tx>t the tangency would become two crossings and tt would not be equal to supT\sup T. It cannot be a tangency in which the two curves meet externally, because then by convexity for x<tx<t the curves would have only two crossing points near the tangency and again tt would not be equal to supT\sup T. And it cannot be a tangency in which the curve with the smaller value of rir_{i} lies outside the curve with the larger value of rir_{i}, because that would violate Lemma 5. However, these exhaust the possible ways the two curves can be tangent. This contradiction completes the proof. ∎

The next proposition states that (with the same assumptions as Lemma 5 and Proposition 6) the bisectors B(p,q)B(p,q) and B(p,s)B(p,s) act like pseudolines: they meet in at most one point, and if they meet they cross properly.

Proposition 7

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) be a convex function such that gg and hh are triply-differentiable, g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2}, and h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2}. Then any two bisectors B(p,q)B(p,q) and B(p,s)B(p,s) defined from ff have at most one point of intersection. If they intersect, they cross properly.

Proof:

We show that B(p,q)B(p,q) and B(p,s)B(p,s) meet in at most one point by showing that any two points tt and uu in the plane are intersected by at most one bisector B(p,)B(p,\cdot). If there is a bisector B(p,q)B(p,q) that contains both of these points, then pp and qq are equidistant from tt and from ss; that is, pp and qq both belong to the level sets St={sf(ts)=f(tp)}S_{t}=\{s\mid f(t-s)=f(t-p)\} and Su={sf(us)=f(up)}S_{u}=\{s\mid f(u-s)=f(u-p)\}. These level sets are rotated by π\pi from the level sets of Proposition 6 but that rotation does not affect the conclusion of the proposition: they have at most two points of intersection. One of these intersection points is pp and the other is qq; there can be no third intersection to form another bisector with pp through tt and uu. If B(p,q)B(p,q) and B(p,s)B(p,s) met in two points, it would violate the uniqueness of bisectors through pairs of points, so such a double intersection cannot happen.

To complete the proof of the proposition, we must show that if two bisectors intersect, they meet in a proper crossing. But if two bisectors B(p,q)B(p,q) and B(p,s)B(p,s) met at a point of tangency without crossing, then a small translation of ss either towards or away from pp would transform this tangency into a pair of crossings, violating the first part of the proposition. ∎

In other words, if we fix pp and let qq vary, the family of bisectors B(p,q)B(p,q) forms a weak pseudoline arrangement. However, the proposition applies only to pairs of bisectors that share one of their defining points. These results are not quite enough to show that minimization diagrams for ff are abstract Voronoi diagrams in the sense of Klein [14], because abstract Voronoi diagrams require all bisectors to have a constant number of intersection points. However, the same general results as for abstract Voronoi diagrams follow in this case.

Theorem 8

Let f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) be a convex function such that gg and hh are triply-differentiable, g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2}, and h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2}. Then any minimization diagram for ff, defined by a finite set PP of nn point sites, subdivides the plane into nn simply-connected regions, one per site. The diagram can be constructed in time O(nlogn)O(n\log n) using a primitive that finds minimization diagrams for three sites.

Proof:

We may assume without loss of generality that the minima of gg and hh occur at x=y=0x=y=0, for otherwise we may add an appropriate constant to xx and yy without changing the combinatorial description of the minimization diagram. Thus, the cell for any point pp contains pp itself. In any weak arrangement of pseudolines, any nonempty intersection of halfspaces defined by the pseudolines forms a single cell of the arrangement (e.g. see Theorem 11.4.11 of [7]). It follows by Proposition 7 that the cell of pp in the minimization diagram is a single cell in a weak arrangement of pseudolines and is therefore simply connected. Thus, the minimization diagram for ff and PP consists of nn simply connected cells.

We construct the diagram by a standard randomized incremental algorithm in which we add points to PP one at a time according to a uniformly random permutation, and maintain a history DAG describing the cells of the diagram in past states of the construction. We also maintain the sequence of bisectors surrounding each cell of the diagram, in a balanced binary tree data structure. To add a point pp, we use the history DAG to locate the cell of the diagram that contains pp. We then form a list LL of cells known to overlap with the cell of pp; initially this list includes only the cell containing pp. To build the cell for pp, we repeatedly remove the cell for a site qq from LL, and split this cell along the bisector B(p,q)B(p,q). The points where this bisector crosses the boundary of the cell for qq may be found by a binary search of the boundary, in which each step consists of finding the vertex of the minimization for pp, qq, and a third site determining one of the boundary segments, and comparing the xx and yy coordinates of this vertex to those of the other vertices on the segment. After the part to be removed from the cell of qq is determined, the boundary segments in the binary search tree for qq are removed and the associated cells are added to LL if necessary.

The time to locate pp is O(logn)O(\log n) in expectation by a standard analysis of history DAGs. Each new feature of the minimization diagram takes O(logn)O(\log n) time to construct, using the binary search trees, and there are in expectation O(1)O(1) new features for the iith added site. Thus, the total expected time for the construction is O(nlogn)O(n\log n). ∎

IV Two Bad Examples

The assumptions that we make on the form of f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) as a sum of two univariate convex functions, and on the triple derivatives of these functions, may seem technical and unnecessary. However, in this section we provide examples showing that without the assumption on the form of ff beyond convexity, its minimization diagrams may have quadratic complexity, and without assumption on the triple derivatives of gg and hh, the level sets for ff may not be pseudocircles.

Refer to caption
Figure 4: The level sets for f(x,y)=ex2+ey2f(x,y)=e^{x^{2}}+e^{y^{2}} (shown for function values 2.52.5, 55, 1010, 2020, 4040, 8080, and 160160) do not form pseudocircles.

Figure 4 shows an example in which g(x)g(x) and h(y)h(y) grow so quickly that g′′′g>(g′′)2g^{\prime\prime\prime}g^{\prime}>(g^{\prime\prime})^{2} and h′′′h>(h′′)2h^{\prime\prime\prime}h^{\prime}>(h^{\prime\prime})^{2} for sufficiently large xx. Specifically, g′′′g=(16x4+24x2)e2x2g^{\prime\prime\prime}g^{\prime}=(16x^{4}+24x^{2})e^{2x^{2}}, while (g′′)2=(16x4+16x2+4)e2x2(g^{\prime\prime})^{2}=(16x^{4}+16x^{2}+4)e^{2x^{2}}; it follows that g′′′g>(g′′)2g^{\prime\prime\prime}g^{\prime}>(g^{\prime\prime})^{2} for x>1/2x>1/\sqrt{2}. One level set has been translated so that it crosses the outer level set four times, so these level sets are not pseudocircles. More generally, whenever g′′′g>(g′′)2g^{\prime\prime\prime}g^{\prime}>(g^{\prime\prime})^{2} over some interval of values of xx, the level sets of f(x,y)=g(x)+g(y)f(x,y)=g(x)+g(y) do not form pseudocircles: the radius of curvature at one of the tangents with slope 1-1 shrinks rather than growing for increasing values of ff.

Figures 5 and 6 provide a sketch of a construction for a convex function that has minimization diagrams with quadratically growing complexity. The function grows most slowly on a horizontal line through the origin, and more quickly along any other horizontal line, so that for any sites pp and qq that are not on a horizontal line, the Voronoi cell for pp dominates that for qq for points far enough away from both sites on a horizontal line through pp. In particular the vertical line of cells to the right of the figure generates a sequence of cells with horizontal boundaries that extends, despite interruptions, through the whole figure. A more widely spaced sequence of sites at the bottom of the figure interrupts these cells, splitting them into linearly many pieces.

Refer to caption
Figure 5: Level sets for a convex function the minimization diagrams of which have quadratic complexity.
Refer to caption
Figure 6: Sketch of the structure for a minimization diagram of a convex function with quadratic complexity.

V Voronoi Diagrams for Smoothed Distance

So, now that we’ve transformed the smoothed distance Voronoi diagram into the form of a minimization diagram for a function f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y), and now that we know conditions on gg and hh that ensure that the minimization diagram to have linear complexity and be constructable efficiently, do the specific gg and hh arising in this application meet these conditions? The answer is: it depends.

First, consider the function g(x)=ln(ex+2+ex)g(x)=\ln(e^{x}+2+e^{-x}), with derivatives g(x)=(ex1)/(ex+1)g^{\prime}(x)=(e^{x}-1)/(e^{x}+1), g′′(x)=2ex/(1+ex)2g^{\prime\prime}(x)={2e^{x}}/{(1+e^{x})^{2}}, and g′′′(x)=2ex(ex1)/(ex+1)3g^{\prime\prime\prime}(x)=-{2e^{x}(e^{x}-1)}/{(e^{x}+1)^{3}}. For positive xx, g′′′g^{\prime\prime\prime} and therefore g′′′gg^{\prime\prime\prime}g^{\prime} are negative while (g′′)2(g^{\prime\prime})^{2} is positive, so g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2}. Because the function is symmetric (g(x)=g(x)g(-x)=g(x)) the same holds for negative xx. And at zero, g′′′g=0g^{\prime\prime\prime}g^{\prime}=0 while (g′′)2(g^{\prime\prime})^{2} is nonzero. Therefore, gg meets the conditions of Theorem 8.

Next, consider the function h(y)=ln(1+cosy)h(y)=-\ln(1+\cos y). Its derivatives are h(y)=tan(y/2)=siny/(1+cosy)h^{\prime}(y)=\tan(y/2)=\sin y/(1+\cos y), h′′(y)=1/(1+cosy)h^{\prime\prime}(y)=1/(1+\cos y), and h′′′(y)=siny/(1+cosy)2h^{\prime\prime\prime}(y)=\sin y/(1+\cos y)^{2}. Then h′′′h=sin2y/(1+cosy)3h^{\prime\prime\prime}h^{\prime}=\sin^{2}y/(1+\cos y)^{3}, while (h′′)2=1/(1+cosy)2(h^{\prime\prime})^{2}=1/(1+\cos y)^{2}. The ratio of these two values, sin2y/(1+cosy)2=tan2(y/2)\sin^{2}y/(1+\cos y)^{2}=\tan^{2}(y/2), is less than one when |y|<π/2|y|<\pi/2 and greater than one when |y|>π/2|y|>\pi/2. Thus, hh satisfies the requirement that h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2} only for yy in the interval (π/2,π/2)(-\pi/2,\pi/2). This implies that we may only apply Theorem 8 to smoothed distance when each Voronoi cell consists of points spanning at most a right angle with oo and the cell’s site.

Theorem 9

Let PP be a point set such that, in the Voronoi diagram for oo-smoothed distance, every point qq within the Voronoi cell for a site pp forms an angle poq\angle poq that is at most π/2\pi/2. Then each cell in the Voronoi diagram is connected, and the diagram may be constructed in randomized expected time O(nlogn)O(n\log n).

Proof:

To prove this, in outline, we replace the point set PP by its logarithmically transformed image {pepP}\{p\mid e^{p}\in P\}; each point in PP corresponds to infinitely many transformed points, all with the same xx coordinate and with yy coordinates that differ by integer multiples of 2π2\pi. Under this transformation, each point in the transformed plane is associated with a Voronoi region that the exponential function maps back to the correct Voronoi region for the associated input point in the original plane. Then, instead of using the functions g(x)g(x) and h(y)h(y) in the transformed plane, as defined above, we replace the function h(y)h(y) by a modified function that has the same values within the interval (π/2,π/2)(-\pi/2,\pi/2) but that obeys the inequality h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2} for larger values as well. This replacement allows us to apply Theorem 8 to the transformed input, and we show that, with the assumptions stated in the theorem, it produces the same cell decomposition as the one we wish to compute. We use an efficient randomized incremental algorithm to compute the smoothed Voronoi diagram, similar to the algorithm used in Theorem 8.

Smoothed distance may be replaced by the translates of a convex function by logarithmically mapping the sites and monotonically transforming the distance values. Thus, Voronoi diagrams for smoothed distance are closely related to minimization diagrams for this convex function. The specific relation is this: if we view the points in the plane as complex numbers, with o=0o=0, and map the finite set PP of sites to the infinite vertically-periodic set L={qeqP}L=\{q\mid e^{q}\in P\}, then the exponential function forms a covering map from the minimization diagram of ff with respect to LL to the Voronoi diagram for smoothed distance of PP. The cells in the minimization diagram are mapped many-to-one to cells in the Voronoi diagram, and edges and features in the minimization diagram are mapped to edges and features in the Voronoi diagram, etc. Although it is problematic to perform geometric algorithms on infinite point sets such as LL, we may use our analysis to show that cells in the minimization diagram for LL are simply connected, while performing the randomized incremental algorithm described in the proof of Theorem 8 directly on the finite point set PP.

There is a difficulty with this approach, however: our proof that the cells are simply connected does not apply, because the convex function into which we have transformed smoothed distance does not meets the requirement of Theorem 8 that the function hh satisfies the inequality h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2}, at least for large values of yy. And although the assumptions of Theorem 9 imply that only small values of yy need be considered in the final Voronoi diagram, larger values may be needed at early stages of our randomized incremental construction.

Therefore, rather than computing the Voronoi diagram for smoothed distance do(p,q)d_{o}(p,q) itself, we compute the Voronoi diagram for a (non-metric) distance function D(p,q)=g(ln(d(p,o)/d(q,o)))+h(poq)D(p,q)=g(\ln(d(p,o)/d(q,o)))+h(\angle poq). Here g(x)=ln(ex+2+ex)g(x)=\ln(e^{x}+2+e^{-x}), matching the monotonically-transformed formula for smoothed distance. However, we set h(y)h(y) to be a function that equals ln(1+cosy)-\ln(1+\cos y) for |y|π/2|y|\leq\pi/2 but that is a quadratic polynomial for values of yy outside this range; the two quadratic polynomials (for positive and negative yy) are chosen to have a value, first derivative, and second derivative that matches ln(1+cosy)-\ln(1+\cos y) at π/2-\pi/2 and π/2\pi/2. However, being quadratic polynomials, they have third derivative equal to zero, and therefore satisfy the requirement that h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2} for the range of values of yy in which they define the value of hh. The fact that the overall hh function has a discontinuous third derivative at π/2-\pi/2 and at π/2\pi/2 does not cause any problems for our analysis.

With this modified distance function, Theorem 8 can be used to show that the cells of the minimization diagram for g(x)+h(y)g(x)+h(y) with respect to the points of LL are simply connected, and therefore that their images, the cells of the Voronoi diagram for DD with respect to the points of PP, are also connected. We may then apply a randomized incremental algorithm of the type described in Theorem 8 to construct the Voronoi diagram for DD with respect to the points of PP. At intermediate stages of this construction, the cells of the diagram may have self-adjacencies (corresponding to boundaries between two different images in LL of a point in PP) but these need not be treated any differently than any other of the bisectors in the diagram, and must vanish before the algorithm finishes.

It remains to show that each cell in the diagram for the modified distance function is equal to the corresponding cell in the diagram for the true smoothed distance dod_{o}. Observe that, for any site pp, the cell for pp for distance DD is contained within the boundaries of the cell for pp for distance dod_{o}: by assumption, these boundaries are all within the region of the plane in which D(p,q)D(p,q) and (the corresponding monotonic transformation of) do(p,q)d_{o}(p,q) coincide, so on those boundary points do(p,q)d_{o}(p,q) is accurately represented by D(p,q)D(p,q) while the distances from qq to other points as measured by DD may be underestimates of the true value as measured by dod_{o}. Thus, the cells for the Voronoi diagram for DD are subsets of the corresponding cells for the Voronoi diagram of dod_{o}. However, since the cells for the Voronoi diagram for DD nevertheless cover the plane, both sets of cells coincide and the computed Voronoi diagram is correct. ∎

VI Lloyd’s Algorithm

Evenly spaced points in Euclidean and related metric spaces have applications ranging from coding theory [17] and color quantization [10] to dithering (spatial halftoning) and stippling for image rendering [18, 22]. However, random points typically have uneven spacing, and metric ϵ\epsilon-nets (maximal point sets such that no two points are closer than ϵ\epsilon to each other), while more uniform, may still have varying density. A common method for improving the spacing of Euclidean point sets is Lloyd’s algorithm [17], a variant of the KK-means clustering algorithm that repeatedly computes a Voronoi diagram and replaces each point by the centroid of its Voronoi cell. Its output is a centroidal Voronoi diagram [DuFabGun-SR-99], a well-spaced collection of points that form the centroids of their Voronoi cells.

Clarkson [2] suggested using metric ϵ\epsilon-nets for oo-smoothed distance to generate well-spaced point sets with a distribution centered at oo that decreases exponentially with distance from oo. For this application, one must restrict the points to an annulus centered on oo; otherwise, an ϵ\epsilon-net would not have a finite number of points. As an alternative means of generating exponentially-distributed and well-spaced points in this annulus, we experimented with a variant of Lloyd’s algorithm that uses smoothed distance in place of Euclidean distance in its calculations. Specifically, rather than computing a Euclidean Voronoi diagram of the given points, we computed a Voronoi diagram for the smoothed distance. And rather than moving each point to the centroid of its cell CC (the point pp minimizing qCd(p,q)2𝑑C\int_{q\in C}d(p,q)^{2}dC), we move each point to the point minimizing qCdo(p,q)2𝑑C\int_{q\in C}d_{o}(p,q)^{2}dC. Finally, in order to make the measure dCdC of area used in the definition of the area integral transform scale-invariantly to match the symmetries of the smoothed distance, we chose a measure that is uniform not in the Euclidean plane in which the smoothed distance is defined, but rather the uniform measure in the transformed plane that has the Euclidean polar coordinates (logr,θ)(\log r,\theta) as its Cartesian coordinates.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 7: Lloyd’s algorithm on an annulus with an 18:1 ratio of inner to outer radius, for 128 exponentially-distributed random points. Top: initial configuration and one iteration. Center: after two and four iterations. Bottom: after 4, 8, and 16 iterations. The large black dots are the sites at each iteration; the smaller white spots represent the smoothed-distance Voronoi centroids to which these sites will be moved at the next iteration.

For simplicity, our implementation performs its calculations in the Euclidean plane, rasterized as a bitmap image. We compute the Voronoi diagram by finding the nearest site to each pixel of the rasterized annulus, and approximate qCdo(p,q)2𝑑C\int_{q\in C}d_{o}(p,q)^{2}dC by qCdo(p,q)2/d(q,o)2\sum_{q\in C}d_{o}(p,q)^{2}/d(q,o)^{2}, where the sum is over the pixels in the Voronoi region CC and the 1/d(q,o)21/d(q,o)^{2} term weights each pixel by its measure in the transformed plane. The results of one run of our implementation are depicted in Figure 7. We found that the iteration quickly (within two iterations) smoothed out any gross variation in the spacing of the given points, and then more slowly converged to a more ideal shape for each Voronoi cell. It was necessary to choose an initial set of points that was exponentially distributed around oo; we placed each point by choosing LL uniformly within the interval [lnr,lnR][\ln r,\ln R] (where rr and RR are the inner and outer radius of the annulus) and θ\theta uniformly in [0,2π][0,2\pi], and then selecting the point (eLcosθ,eLsinθ)(e^{L}\cos\theta,e^{L}\sin\theta) in the Euclidean plane. We found that if instead we selected points with uniform Euclidean measure in the annulus, too many points were placed far from oo and too few were placed close to oo; Lloyd’s algorithm was slow in correcting this imbalance.

VII Conclusions

We have identified a general condition on convex functions that causes their minimization diagrams to have linear complexity, applied this condition to Voronoi diagrams of smoothed distance and to finding the minimum dilation pair of leaves in a star network, and experimented with using a smoothing algorithm based on these Voronoi diagrams to generate evenly-spaced points exponentially distributed around a given center point.

Several directions for further research remain open:

  • If we translate the convex function f(x,y)f(x,y) in three dimensions rather than two by adding independent constants to the values for each point site, when does the resulting planar minimization diagram still have linear complexity? For instance, additively weighting f(x,y)=x2+y2f(x,y)=x^{2}+y^{2} in this way results in a power diagram. For any convex f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y), the bisectors of an additively weighted minimization diagram are still monotone curves, but we can no longer guarantee that they form pseudoline arrangements. Nevertheless it might be possible that they form minimization diagrams with connected cells.

  • Is it possible to characterize the functions that can be monotonically transformed into the form f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) with gg and hh both convex? The functions that have this form already are exactly the convex functions for which every axis-parallel rectangle has equal sums on its two pairs of opposite corners. However, if a function does not already have this form it may not be clear how to transform it into this form, as we did for smoothed distance.

  • Does our condition g′′′g<(g′′)2g^{\prime\prime\prime}g^{\prime}<(g^{\prime\prime})^{2} and h′′′h<(h′′)2h^{\prime\prime\prime}h^{\prime}<(h^{\prime\prime})^{2} characterize the convex functions gg and hh such that the translated level sets of f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) form pseudocircles? It does when g=hg=h: If g′′′g>(g′′)2g^{\prime\prime\prime}g^{\prime}>(g^{\prime\prime})^{2}, then level sets of f(x,y)=g(x)+g(y)f(x,y)=g(x)+g(y) have a curvature at slope 1 that grows tighter for larger circles. However the situation is less clear when gg and hh may differ.

  • In particular, does the convex function f(x,y)=g(x)+h(y)f(x,y)=g(x)+h(y) coming from smoothed distance and dilation have level sets that are pseudocircles when y>π/2y>\pi/2?

  • If not, is there some other natural distance function dd on the nonzero complex numbers, satisfying scale invariance d(zp,zq)=d(p,q)d(zp,zq)=d(p,q), that has simply connected Voronoi regions for all sets of two or more points in general position? Note that the most obvious choice, the Euclidean distance between lnp\ln p and lnq\ln q, does not work: in general there will be a single Voronoi region containing the origin, which will not be simply connected. The replacement function used in the proof of Theorem 9 does not seem very natural.

  • If we define a maximization diagram in which the sites are point pairs (p,q)(p,q) and the function to be maximized is the dilation d(p,q)/(d(p,o)+d(q,o))d(p,q)/(d(p,o)+d(q,o)) of pp and qq with respect to a query point oo, our previous results [8] imply that this diagram has O(n)O(n) cells. Are these cells simply connected?

  • Can we characterize the convex functions whose level sets are pseudocircles? For instance, as well as the functions g(x)+h(y)g(x)+h(y) studied here, this is also true of convex distance functions.

  • If a convex function has level sets that are pseudocircles, do its minimization diagrams automatically have simply connected cells, or is an additional condition required for this to be true?

  • To what extent can this theory be generalized to minimization diagrams in higher dimensions?

Acknowledgements

This work was supported in part by NSF grant 0830403 and by the Office of Naval Research under grant N00014-08-1-1015. We thank Elena Mumford for helpful comments on a draft of this paper.

References

  • [1] L. P. Chew and R. L. Drysdale, III. Voronoi diagrams based on convex distance functions. In Proc. 1st ACM Symp. Computational Geometry, pages 235–244, 1985.
  • [2] K. L. Clarkson. Metric Spaces, Nets, and Applications. Computer Science Seminar, UC Irvine, October 2008.
  • [3] H. de Fraysseix and P. Ossona de Mendez. Stretching of Jordan arc contact systems. In Proc. 11th Int. Symp. Graph Drawing (GD 2003), Lecture Notes in Computer Science, pages 71–85. Springer-Verlag, 2003.
  • [4] A. W. M. Dress. Trees, tight extensions of metric spaces, and the cohomological dimension of certain groups. Advances in Mathematics, 53:321–402, 1984.
  • [5] D. Eppstein. Spanning trees and spanners. In J.-R. Sack and J. Urrutia, editors, Handbook of Computational Geometry, pages 425–461. Elsevier, 9 edition, 2000.
  • [6] D. Eppstein. Algorithms for drawing media. In J. Pach, editor, Proc. 12th Int. Symp. Graph Drawing (GD 2004), volume 3383 of Lecture Notes in Computer Science, pages 173–183. Springer-Verlag, 2004.
  • [7] D. Eppstein, J.-C. Falmagne, and S. Ovchinnikov. Media Theory. Springer-Verlag, 2007.
  • [8] D. Eppstein and K. A. Wortman. Minimum dilation stars. Computational Geometry: Theory and Applications, 37(1):27–37, 2007.
  • [9] D. Halperin and M. Sharir. New bounds for lower envelopes in three dimensions, with applications to visibility in terrains. Discrete & Computational Geometry, 12(1):313–326, 1994.
  • [10] P. Heckbert. Color image quantization for frame buffer display. In ACM SIGGRAPH, pages 297–307, 1982.
  • [11] J. R. Isbell. Six theorems about injective metric spaces. Comment. Math. Helv., 39:65–76, 1964.
  • [12] P. Jaccard. Étude comparative de la distribution florale dans une portion des Alpes et des Jura. Bulletin del la Société Vaudoise des Sciences Naturelles, 37:547–579, 1901.
  • [13] K. Kedem, R. Livne, J. Pach, and M. Sharir. On the union of Jordan regions and collision-free translational motion amidst polygonal obstacles. Discrete & Computational Geometry, 1(1):59–71, 1986.
  • [14] R. Klein. Concrete and Abstract Voronoi diagrams, volume 400 of Lecture Notes in Computer Science. Springer-Verlag, 1989.
  • [15] R. Klein, K. Mehlhorn, and S. Meiser. Randomized incremental construction of abstract Voronoi diagrams. Computational Geometry: Theory and Applications, 3:157–184, 1993.
  • [16] J. Linhart and R. Ortner. An arrangement of pseudocircles not realizable with circles. Beiträge zur Algebra und Geometrie, 46(2):351–356, 2005.
  • [17] S. P. Lloyd. Least squares quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982.
  • [18] R. Maciejewski, T. Isenberg, W. M. Andrews, D. S. Ebert, M. Costa Sousa, and W. Chen. Measuring stipple aesthetics in hand-drawn and computer-generated images. IEEE Computer Graphics, 28(2):62–74, 2008.
  • [19] K. Mehlhorn, S. Meiser, and C. Ó’Dúnlaing. On the construction of abstract Voronoi diagrams. Discrete & Computational Geometry, 6:211–224, 1991.
  • [20] F. Nielsen, J.-D. Boissonnat, and R. Nock. On Bregman Voronoi diagrams. In Proc. 18th ACM-SIAM Symp. Discrete Algorithms, pages 746–755, 2007.
  • [21] P. Shor. Stretchability of pseudolines is NP-hard. In P. Gritzmann and B. Sturmfels, editors, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, volume 4 of DIMACS Series in Discrete Mathematics and Theoretical Computer Science, pages 531–554. American Mathematical Society, Providence, R.I., 1991.
  • [22] R. Ulichney. Digital Halftoning. MIT Press, 1987.