## A PARTIAL DIFFERENTIAL EQUATION OBSTACLE PROBLEM FOR THE LEVEL SET APPROACH TO VISIBILITY

ADAM M. OBERMAN AND TIAGO SALVADOR

Abstract. In this article we consider the problem of finding the visibility set from a given point when the obstacles are represented as the level set of a given function. Although the visibility set can be computed efficiently by ray tracing, there are advantages to using a level set representation for the obstacles, and to characterizing the solution using a Partial Differential Equation (PDE). A nonlocal PDE formulation was proposed in Tsai et. al. (Journal of Computational Physics 199(1):260-290, 2004) [TCO + 04]: in this article we propose a simpler PDE formulation, involving a nonlinear obstacle problem. We present a simple numerical scheme and show its convergence using the framework of Barles and Souganidis. Numerical examples in both two and three dimensions are presented.

## 1. Introduction

In this article we consider the problem of finding the visibility set from a given viewpoint given a set of known obstacles using a Partial Differential Equation (PDE). In principle, the visibility set is simply given by ray tracing and there are numerous algorithms for solving the visibility problem using explicit representations of the obstacles [CT97, DDTP00, AS96a, AS96b].

Finding the visibility set plays a crucial role in numerous applications including rendering, visualization [HZ00], etching [SA97], surveillance, exploration [VTS14], navigation [LTC06], and inverse problems, to only name a few. Specifically, in [CT05] the level set framework [OS88, Set99] developed in [TCO + 04] was extended to deal with the optimal placing of a single viewer or a group of viewers and A -toB optimal path planning, where optimality is measured in terms of the volume of the visible region. More recently, in [LT18] a convolutional neural network is proposed to determine the vantage points that maximize visibility in the context of surveillance and exploration, with the visibility sets of the training data being computed efficiently using the PDE formulation introduced in [TCO + 04]. For applications which involve optimization of the viewpoint, the discontinuity of the visibility can make optimization more difficult. The advantage of using level set/PDE methods is the improved regularity of the solution.

It is clear then that the ultimate goal of the work is inverse problems involving visibility. As is the case with inverse problems, a better understanding of the forward problem is essential for better results of the more challenging inverse problem. In this work, we focus our attention in the forward problem and do not go further and study the inverse problem. We propose a simple formulation of the visibility

Date : August 5, 2019.

Key words and phrases. Visibility, Level set method, Viscosity solutions, Fast sweeping method.

problem - the visibility set is the subzero level set of the solution of a nonlinear obstacle problem.

In [TCO + 04] the visibility problem is presented as a boundary value problem for a first order differential equation: the visibility set to a given viewpoint x ∗ is given by { ψ x ( ) ≥ } 0 where the function ψ x ( ) is the solution of

$$\nabla \, \psi \cdot \frac { x - x ^ { * } } { | x - x ^ { * } | } = \min \left \{ H ( \psi - g ) \, \nabla \, g \cdot \frac { x - x ^ { * } } { | x - x ^ { * } | }, 0 \right \}$$

with ψ x ( ∗ ) = g x ( ∗ ). Here H z ( ) = χ [0 , ∞ ) ( z ) is the characteristic function of [0 , ∞ ) and g is a signed distance function to the obstacles, positive outside the obstacles and negative inside. Despite the complex nature of the operator in (1), in [KT08] the visibility function ψ is shown to be the viscosity solution of an equivalent Hamilton-Jacobi type equation involving jump discontinuities in the Hamiltonian. A numerical scheme to solve this equation is presented and its convergence is established.

For our formulation, g is still a signed distance function to the obstacles, but is instead negative outside and positive inside. Then the visibility set is given as { u x ( ) ≤ 0 } where the function u x ( ) solves the following nonlinear first order local PDE

$$\min \{ u ( x ) - g ( x ), ( x - x ^ { * } ) \cdot \nabla u ( x ) \} = 0$$

with u x ( ∗ ) = g x ( ∗ ). This is not only considerably simpler than (1), but can also be generalized to allow multiple viewpoints as we will show. Moreover, each sublevel set of u is in fact the visibility set of the corresponding superlevel set of g . Efficiencies then arise when the obstacles are given by the graph of a function (for example, heights of buildings). In this case, we can reduce the dimension of the problem, and compute the horizontal visibility set from a given height, using the level set representation. Similarly, if the t superlevel set of g represents the position of the obstacles at a certain time t ( g can for instance be the solution of an Eikonal equation), then the PDE needs to be solved only once and the visibility set at any given time can be extracted from the corresponding sublevel set.

The paper is organized as follows. In section 2, we characterize visibility sets as star-shaped envelopes. In section 3 we derive the new visibility PDE and its generalization to multiple viewpoints. In section 4 we present the numerical scheme, while in section 5 we establish its convergence. Finally, in section 6 we present both two-dimensional and three-dimensional examples of visibility sets computed using the new proposed PDE.

## 2. Star shaped sets and functions

In this section we give an interpretation of the visibility set from a given point x ∗ as the star-shaped envelope with respect to the point x ∗ . The definitions of star-shaped sets and envelopes are then extended to functions. Finally, we provide explicit formulas for the star-shaped envelopes of a function.

We star by recalling the definition of a star-shaped set.

Definition 2.1. We say the set S ⊂ R n is star-shaped with respect to x ∗ if

$$x \in S \implies t x ^ { * } + ( 1 - t ) x \in S, \quad \text{for all $t\in[0,1]$.}$$

A simple example of a star-shaped set is a convex set. Indeed, convex sets are star-shaped with respect to every point inside. Moreover, intersections of convex

sets are convex, but unions are not. As a consequence there is a natural (outer) convex envelope, but not an inner one. On the other hand, star-shaped sets are closed under both intersections and unions, which means one can define two starshaped envelopes (with respect to x ∗ ) for sets, the inner and outer envelopes.

Definition 2.2. Given S ⊂ R n and x ∗ ∈ S , the outer star-shaped envelope of S with respect to x ∗ is the intersection of all star-shaped sets with respect to x ∗ which contain S . The inner star-shaped envelope of S is the union of all star-shaped sets contained in it.

Figure 1. The inner and outer star-shaped envelopes of a set: the original set (left, dashed); inner star-shaped envelope / visibility set (center); outer star-shaped envelope (right).

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-18369a33-8180-45f4-9a8f-0db57f5d1d13.jpg)

Looking at Figure 1, one immediately sees how the inner star-shaped envelope corresponds to the visibility subset of S if there is an illumination source at the point x ∗ . The remainder of S is the invisible part. One the other hand, the outer star-shaped envelope minus S corresponds to the least amount of obstacles which would need to be removed so that all of S is visible from x ∗ .

We now discuss star-shaped functions which are the main building block to characterize the visibility set as the solution of a nonlinear obstacle PDE. We write S α ( u ) ≡ { x ∈ R n | u x ( ) ≤ α } for the α -sublevel set of a function u and let Ω be a star-shaped domain with respect to x ∗ .

Definition 2.3. We say that the function u : Ω → R is star-shaped with respect to x ∗ if

S α ( u ) is star-shaped with respect to x ∗

for all α ∈ R .

Remark 2.1 . Notice the similarity to quasiconvex functions: u is said to be quasiconvex if S α ( u ) is convex for all α ∈ R .

We now characterize star-shaped functions with a zero-order condition.

Lemma 2.4. A function u : Ω → R is star-shaped with respect to x ∗ if and only if

(2) u tx ( ∗ +(1 -t ) y ) ≤ u y , ( ) for all y ∈ Ω 0 , ≤ t ≤ 1 .

Proof. By definition, u is star-shaped with respect to x ∗ if and only if for all α ∈ R , S α ( u ) is star-shaped with respect to x ∗ . This is equivalent to the condition

$$u ( y ) \leq \alpha \implies u ( t x ^ { * } + ( 1 - t ) y ) \leq \alpha, \quad \text{for all } y \in \Omega, 0 \leq t \leq 1$$

for all all α ∈ R , which in turn is equivalent to (2).

glyph[square]

We use this result to describe the monotonicity of a star-shaped function.

Proposition 2.5. Let u : Ω → R be a function. Then u is star-shaped with respect to x ∗ if and only if u is increasing along rays from x ∗ to x . Moreover, if u is star-shaped with respect to x ∗ , then x ∗ is a global minimum of u .

Proof.

$$P r o o f. \text{ This follows immediately from Lemma 2.4.}$$

Next, in a similar way to star-shaped envelopes of a set, we define upper and lower star-shaped envelopes of a function g with respect to a point x ∗ .

Definition 2.6. Let g ∈ C (Ω) be bounded by below. The lower star-shaped envelope of g with respect to x ∗ is defined as

- (3) SS -( g )( x ) = sup { v x ( ) | v is star-shaped with respect to x ∗ and v ≤ g } ,

while the upper star-shaped envelope is given by

- (4) SS + ( g )( x ) = inf { v x ( ) | v is star-shaped with respect to x ∗ and v ≥ g } .

Remark 2.2 . We require that g is bounded by below in order for the lower starshaped envelope to be well defined since otherwise there would no star-shaped function with respect to x ∗ bounded from above by g .

We finish this section by proving the following simple explicit solution formulas for the star-shaped envelope of a function.

Proposition 2.7. Let g ∈ C (Ω) be bounded by below and define w : Ω → R to be given by

$$w ( x ) = \min \left \{ g ( y ) \ | \ y = x + t ( x - x ^ { * } ) \in \Omega, t \geq 0 \right \}$$

with w x ( ∗ ) = min x ∈ Ω g x ( ) . Then w is star-shaped with respect to x ∗ and w = SS -( g ) .

Proof. By the assumptions on g , w is well-defined. By construction, w is increasing along rays from x ∗ to x , and so, by Proposition 2.5, w is star-shaped with respect to x ∗ . Moreover, it is clear that w ≤ g .

glyph[negationslash]

We want to show that w = SS -( g ). Suppose by contradiction that it is not. This means that there exists a star-shaped with respect to x ∗ function v with v ≤ g such that v x ( ) &gt; w x ( ) for some x ∈ Ω. Without loss of generality, assume that x = x ∗ . We have w x ( ) &lt; g x ( ) and that there exists y ∈ Ω such that

$$y \in \arg \min \left \{ g ( y ) \, | \, y = x + t ( x - x ^ { * } ) \in \Omega, t > 0 \right \}.$$

Hence v x ( ) &gt; w x ( ) = w y ( ) = g y ( ) ≥ v y ( ) and therefore v is not increasing along the ray from x ∗ to x . Finally, we invoke Proposition 2.5 to conclude that v is not star-shaped with respect to x ∗ , which leads to the desired contradiction. glyph[square]

Remark 2.3 . Intuitively, we can find w by tracing the values from the boundary along rays to x ∗ and taking the minimum of g along the way.

Proposition 2.8. Let g ∈ C (Ω) and define u : Ω → R to be given by

- (6) u x ( ) = max { g y ( ) | y = x ∗ + ( t x -x ∗ ) ∈ Ω , t ∈ [0 , 1] } .

Then u is star-shaped with respect to x ∗ and u = SS + ( g ) .

Proof. From the definition of u , it is clear that u is increasing along rays from x ∗ to x , and so, by Proposition 2.5, u is star-shaped with respect to x ∗ . Moreover, u ≥ g , again by definition of u .

glyph[negationslash]

We want to show that u = SS + ( g ). Suppose by contradiction that it is not. This means that there exists a star-shaped with respect to x ∗ function v with v ≥ g such that v x ( ) &lt; u x ( ) for some x ∈ Ω. Without loss of generality assume x = x ∗ . We have u x ( ) &gt; g x ( ) and that there exists y ∈ Ω such that

$$y \in \arg \max \left \{ g ( y ) \ | \ y = x ^ { * } + t ( x - x ^ { * } ) \in \Omega, t \in [ 0, 1 ) \right \}.$$

Hence v x ( ) &lt; u x ( ) = u y ( ) = g y ( ) ≤ v y ( ), which means, just like in the proof of Proposition 2.7, that v is not increasing along the ray from x ∗ to x . Hence v is not star-shaped with respect to x ∗ according to Proposition 2.5 and we have obtained our contradiction. glyph[square]

Remark 2.4 . This formula corresponds to the classic ray tracing algorithm to find the visibility set. We trace the values towards the boundary along rays from x ∗ taking the maximum of g along the way.

## 3. PDEs and Visibility

In this section, we present the new PDE formulation of visibility sets from a single viewpoint and its extension to multiple viewpoints. We start with a level set PDE interpretation for star-shaped envelopes. Given that the inner star-shaped envelope of a set corresponds to its visibility set, the PDE obtained computes the visibility set for each sublevel set. We then generalize it to multiple viewpoints.

- 3.1. Viscosity Solutions. Viscosity solutions [CIL92] provide the correct notion of weak solution to a class of degenerate elliptic PDEs which includes the PDEs considered here. We review it briefly here.

Let S n be the set of real symmetric n × n matrices, and take N ≤ M to denote the usual partial ordering on S n , namely that N -M is negative semi-definite.

Definition 3.1. The operator F x, r, p, M ( ) : Ω × R × R × S n → R is degenerate elliptic if

$$F ( x, r, p, M ) \leq F ( x, s, p, N ) \ \text{ whenever } r \leq s \text{ and } N \leq M.$$

Remark 3.1 . For brevity we use the notation F u [ ]( x ) ≡ F x, u x , ( ( ) ∇ u x , D ( ) 2 u x ( )).

Definition 3.2 (Upper and lower semi-continuous envelopes) . The upper and lower semicontinuous envelopes of a function u x ( ) are defined, respectively, by

$$\psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \psi _ { \quad } \\ u _ { \ast } ( x ) & = \liminf _ { y \to x } u ( y ).$$

Definition 3.3 (Viscosity solutions) . Let F : Ω × R × R n . We say the upper semicontinuous (lower semi-continuous) function u : Ω → R is a viscosity subsolution (supersolution) of F u [ ] = 0 in Ω if for every φ ∈ C 1 (Ω) , whenever u -φ has a local maximum (minimum) at x ∈ Ω ,

$$F ( x, u ( x ), \nabla \, \phi ( x ) ) \leq 0 \ ( \geq 0 ).$$

Moreover, we say u is a viscosity solution of F u [ ] = 0 if u is both a viscosity suband supersolution.

Remark 3.2 . For brevity we use the notation F u [ ]( x ) ≡ F x, u x , ( ( ) ∇ u x ( )). In addition, when checking the definition of a viscosity solution we can limit ourselves to considering unique, strict, global maxima (minima) of u -φ with a value of zero at the extremum. See, for example, [Koi04, Prop 2.2].

3.2. Regularity. We briefly discuss the regularity of the star-shaped envelopes. We start by observing that the star-shaped functions need not be continuous.

glyph[negationslash]

Example 3.1. In one dimension, the function u x ( ) = 1 for x = 0 and u (0) = 0 is star-shaped with respect to 0. In two dimensions, take A = { ( x, y ) ∈ R 2 : xy = 0 } and define u as the characteristic function of the complement of A , i.e., u x ( ) = 0 if x ∈ A and u x ( ) = 1 otherwise. Once again u is star-shaped with respect to the origin, but it is not continuous. In fact, u is lower semicontinuous.

As for the star-shaped envelopes of functions, the upper star-shaped envelope is continuous while the lower star-shaped envelope is only lower semicontinuous as it may be discontinuous at x ∗ .

Proposition 3.4. Let g ∈ C (Ω) be bounded by below. Then w = SS -( g ) is lower semicontinuous in Ω and continuous in Ω except at x ∗ , while u = SS + ( g ) is continuous in Ω . If x ∗ is a global minimum of g then w = SS -is also continuous in Ω .

Proof. The proof follows from the solutions formulas (5) and (6) since we take the minimum and maximum of a continuous function g along rays to and from x ∗ , respectively, as pointed out in Remarks 2.3 and 2.4. glyph[square]

Example 3.2. Let g x ( ) = | x + 1 | and let x ∗ = 0. Then the lower and upper star-shaped envelopes are given by

$$w ( x ) = \begin{cases} - x - 1 & \text{if $x<-1$,} \\ 0 & \text{if $-1\leq x\leq 0$,} \quad \text{and} \quad u ( x ) = \begin{cases} - x - 1 & \text{if $x<-2$,} \\ 1 & \text{if $-2\leq x\leq 0$,} \\ x + 1 & \text{if $x>0$.} \end{cases}$$

A two-dimensional example is given in Figure 2: g is given by the distance to two points and x ∗ is chosen as a point on the . 3 level set of g . The upper and lower envelopes are pictured. The lower one is discontinuous at x ∗ . Replacing g with max( g, g ( x ∗ ) leads to a function whose global minimum is attained at x ∗ and therefore both star-shaped envelopes are continuous in this case. This is depicted in Figure 3.

3.3. A local PDE for star-shaped envelopes. We start by establishing a first order condition for star-shaped functions.

Proposition 3.5. Suppose u : R n → R is differentiable. Then u is star-shaped with respect to x ∗ if and only if ∇ u x ( ) · ( x -x ∗ ) ≥ 0 for all x ∈ R .

Proof. By the mean value theorem, given any t ∈ [0 , 1] there exists s ∈ (0 , t ) such that

$$u ( t x ^ { * } + ( 1 - t ) x ) - u ( x ) = t \, \nabla \, u ( x + s ( x ^ { * } - x ) ) \cdot ( x ^ { * } - x ).$$

Thus if u is star-shaped with respect to to x ∗ we obtain using Lemma 2.4

$$\nabla u ( x + s ( x ^ { * } - x ) ) \cdot ( x ^ { * } - x ) \leq 0.$$

Taking the limit as t → 0 leads to the desired inequality ∇ u x ( ) · ( x -x ∗ ) ≥ 0.

Figure 2. Contour plot of g given in Example 3.2 (left), its lower star-shaped envelope w (center) and its upper (visibility) envelope u (right). The point x ∗ is marked by ∗ . The lower star-shaped envelope is discontinuous.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-d1d2fd31-e2ee-42ef-a508-d5f20245ddb9.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-5d601b37-6bc5-40bc-bb51-43883c5a3137.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-1598f744-8896-4a84-95ed-6d51b49e9717.jpg)

Figure 3. Contour plot of max( g, g ( x ∗ ) where g given in Example 3.2 (left), its lower star-shaped envelope w (center) and its upper (visibility) envelope u (right). The point x ∗ is marked by ∗ . Since x ∗ is a minimizer of max( g, g ( x ∗ )) both star-shaped envelopes are continuous.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-85331ae2-b6e5-41ca-bfbc-63aae2e9870f.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-2e3fe92d-8bec-4dbd-be3b-d2969d787859.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-5bd2f517-6b7d-4010-a320-22deeec67bc4.jpg)

Now, suppose that ∇ u x ( ) ( · x -x ∗ ) ≥ 0 for all x ∈ R n . We argue by contradiction. Assume that u is not star-shaped with respect to x ∗ . Hence, by Lemma 2.4, there are y ∈ Ω and t ∈ [0 , 1] such that

$$u ( t x ^ { * } + ( 1 - t ) y ) > u ( y ).$$

Then, again by the mean value theorem,

$$\nabla u ( y + s ( x ^ { * } - y ) ) \cdot ( x ^ { * } - y ) > 0$$

for some s ∈ (0 , t ). However, taking x = y + ( s x ∗ -y ) in ∇ u x ( ) · ( x -x ∗ ) ≥ 0 leads to

$$\nabla u ( y + s ( x ^ { * } - y ) ) \cdot ( y + s ( x ^ { * } - y ) - x ^ { * } ) \geq 0 \\ \Longleftrightarrow \nabla u ( y + s ( x ^ { * } - y ) ) \cdot ( y - x ^ { * } ) ( 1 - s ) \geq 0 \\ \Longleftrightarrow \nabla u ( y + s ( x ^ { * } - y ) ) \cdot ( y - x ^ { * } ) \geq 0 \\ \Longleftrightarrow \nabla u ( y + s ( x ^ { * } - y ) ) \cdot ( x ^ { * } - y ) \leq 0. \\. \quad. \quad. \quad. \quad. \quad. \quad. \quad. \quad. \quad. \quad. \quad.$$

We have the desired contradiction and so the proof is complete.

glyph[square]

We are interested in star-shaped functions that may not be differentiable since typically the visibility set has corners. Thus we need to characterize star-shaped functions in the weak sense. We will do so using viscosity solutions. Throughout

the rest of this section let Ω be a bounded star-shaped domain with respect to x ∗ ∈ R n and denote its boundary by ∂ Ω.

Proposition 3.6. Suppose u ∈ USC (Ω) . Then u is star-shaped with respect to x ∗ if and only if u is a viscosity subsolution of ∇ u x ( ) · ( x ∗ -x ) = 0 .

Proof. Suppose u is star-shaped with respect to x ∗ . Let φ ∈ C 1 (Ω) be such that u -φ has a local maximum at x ∈ Ω. Without loss of generality assume that φ x ( ) = u x ( ). Then we have u y ( ) ≤ φ y ( ) in a neighborhood of x . Since u is starshaped with respect to x ∗ , u is increasing along arrays from x ∗ to x by Proposition 2.5 and therefore

$$u ( x ) \leq u ( x + h ( x - x ^ { * } ) )$$

for h &gt; 0. Hence, given the choice of φ ,

$$\phi ( x ) \leq \phi ( x + h ( x - x ^ { * } ) )$$

for h &gt; 0 sufficiently small. Since

$$\frac { \phi ( x + h ( x - x ^ { * } ) ) - \phi ( x ) } { h } = \nabla \phi ( x + s ( x ^ { * } - x ) ) \cdot ( x - x ^ { * } ) \\ \dots \cdot \cdot \cdot \cdot \cdot - \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \cdot \end{array}.$$

for s ∈ (0 , h ), we obtain ∇ φ x ( ) · ( x ∗ -x ) ≤ 0 as h → 0. This shows that u is a viscosity subsolution of ∇ u x ( ) · ( x ∗ -x ) = 0.

Suppose now that u is a viscosity subsolution of ∇ u x ( ) · ( x ∗ -x ) = 0 and that u is not star-shaped with respect to x ∗ . Then there exists y, z such that u y ( ) ≥ u x ( ∗ ) and u y ( ) &gt; u z ( ) with y lying on the line segment from x ∗ to z . Without loss of generality assume that y = argmax x u x ( ). We can then construct a linear φ ∈ C 1 (Ω) such that ∇ φ = ( u z ( ) -u y ( ))( z -y ) and u -φ has a local maximum at x with ( x -x ∗ ) · ( z -y ) &gt; 0. But then

$$\nabla \phi ( x ) \cdot ( x - x ^ { * } ) = ( u ( z ) - u ( y ) ) ( z - y ) \cdot ( x - x ^ { * } ) < 0$$

which contradicts our assumption.

glyph[square]

We can now finally write the PDEs for the upper and lower star-shaped envelopes of g with respect to x ∗ .

Proposition 3.7. Let g ∈ C (Ω) be bounded by below and let w = SS -( g ) be the lower star-shaped envelope w of g with respect to x ∗ . Assume w is continuous. Then w is the viscosity solution of the obstacle problem

$$\max \{ w ( x ) - g ( x ), ( x ^ { * } - x ) \cdot \nabla w ( x ) \} = 0$$

along with boundary conditions w = g on ∂ Ω .

Proof. By Proposition 2.7, w is star-shaped with respect to x ∗ and therefore we can write

$$w ( x ) = \sup \{ v ( x ) \ | \ v \in U S C ( \Omega ) \ \text{is star-shaped with respect to } x ^ { * } \ \text{and} \ v \leq g \}.$$

Now, according to Proposition 3.6, w is precisely the supremum of all subsolutions of the PDE and so the proof follows directly from Perron's method. glyph[square]

Proposition 3.8. Let g ∈ C (Ω) and let u = SS + ( g ) be the upper star-shaped envelope (visibility) of g with respect to x ∗ . Then u is the viscosity solution of the obstacle problem

$$\min \{ u ( x ) - g ( x ), ( x - x ^ { * } ) \cdot \nabla u ( x ) \} = 0,$$

along with u x ( ∗ ) = g x ( ∗ ) .

Proof. By definition the upper star-shaped envelope is given by

$$u = \inf \{ v ( x ) \, | \, v ( y ) \geq g ( y ) \, \text{for all } y, \, v \text{ is star-shaped with respect to } x ^ { * } \}.$$

We observe that this is equivalent to

-u = sup { v x ( ) | v y ( ) ≤ -g y ( ) for all y, -v is star-shaped with respect to x ∗ } and so -u is the solution of

$$\max \{ U - ( - g ), - ( x ^ { * } - x ) \cdot \nabla U ( x ) \} = 0,$$

by a similar reasoning to the one in Proposition 3.7. Now, since the equation can be rewritten as

$$\min \{ - U - g, ( x ^ { * } - x ) \cdot \nabla U ( x ) \} = 0,$$

we conclude that u is the solution of

$$\min \{ u - g, ( x - x ^ { * } ) \cdot \nabla u ( x ) \} = 0$$

as desired.

$$, ( x - x ^ { * } ) \cdot \nabla u ( x ) \} = 0 \, \quad \, \quad \, \quad \, \square$$

Remark 3.3 . Contrary to Proposition 3.7 we do not need to assume the continuity of the start-shaped envelope as this follows directly from the assumptions on g (see Proposition 3.4).

3.4. Comparison Principle. An important property of elliptic equations, from which uniqueness follows, is the comparison principle that states that subsolutions lie below supersolutions. In addition, it also plays a crucial role when establishing the convergence of approximation schemes using the the theory of Barles and Souganidis [BS91], which we intend to do later on. However, in such setting, the comparison principle required is a strong comparison principle: The boundary conditions are satisfied in the viscosity sense. In general, such a comparison is only available when the solutions are continuous up to the boundary (see [CIL92] for more details).

We focus our attention in PDE (7) as it is the one we are most interested in: Its solution allows us to determine the visibility set. A strong comparison principle is however not satisfied: Notice that any function that is nonincreasing along any direction away from x ∗ is a subsolution and thus given any supersolution we can always construct a subsolution that lies above it by adding a large enough constant. We can however circumvent this by requiring that the subsolution u satisfies u x ( ∗ ) ≤ g x ( ∗ ). This will also prove to be enough to establish convergence of our numerical scheme. Intuitively, imposing that the subsolution u satisfies u x ( ∗ ) ≤ g x ( ∗ ) guarantees that u lies below g . This, together with the fact that the solution of (7) is the infimum of all supersolutions according to Perron's method, is enough to reach the desired conclusion.

Proposition 3.9. Let g ∈ C (Ω) . Let u be a viscosity subsolution of (7) such that u x ( ∗ ) ≤ g x ( ∗ ) and let v be a supersolution of (7) . Then u ≤ v in Ω .

Proof. Suppose there exists x ∈ Ω such that u x ( ) &gt; v x ( ) by contradiction. Since v is a supersolution (7),

$$v ( x ) \geq S S ^ { + } ( g ) ( x ) = \max \{ g ( y ) \ | \ y = x ^ { * } + t ( x - x ^ { * } ) \in \Omega, t \in [ 0, 1 ] \}$$

where we used Perron's characterization of SS + ( g ) and Proposition 2.8. In particular, we have v x ( ) ≥ g x ( ) and v x ( ) ≥ g x ( ∗ ). Hence u x ( ) &gt; g x ( ) and u x ( ) &gt; u x ( ∗ ) by assumption on u . Therefore there exists a linear function φ such that u -φ has

a local maximum at y with u y ( ) &gt; g y ( ) and ( y -x ∗ ) · ∇ φ y ( ) = u x ( ) -u x ( ∗ ) &gt; 0. We have derived a contradiction with the assumption that u is a subsolution of (7) and the proof is complete. glyph[square]

3.5. Visibility from multiple viewpoints. We are now interested in the visibility set from multiple viewpoints where a point is consider visible if is seen by at least one viewpoint. We follow the same ideas as before, starting by generalizing the definition of star-shaped set.

Definition 3.10. We say that a set S ⊂ R n is star-shaped with respect to { x , . . . , x ∗ 1 ∗ r } if

$$y \in S \implies \exists _ { x ^ { * } \in \{ x _ { 1 } ^ { * }, \dots, x _ { r } ^ { * } \} } \forall _ { t \in [ 0, 1 ] } \, t y + ( 1 - t ) x ^ { * } \in S.$$

As in section 2 we can define star-shaped functions with respect to { x , . . . , x ∗ 1 ∗ n } according to Definition 3.10. More importantly, Proposition 3.5 can be generalized.

Proposition 3.11. Suppose u : R n → R is differentiable and bounded by below. Then u is star-shaped with respect to { x , . . . , x ∗ 1 ∗ r } according to Definition 3.10 if and only if

$$\lambda \max _ { i = 1, \dots, r } \min _ { t \in [ 0, 1 ] } \nabla u ( x _ { i } ^ { * } + t ( x - x _ { i } ^ { * } ) ) \cdot ( x - x _ { i } ^ { * } ) \geq 0.$$

Remark 3.4 . The presence of the minimum in t may not appear obvious at first, but it is crucial here. In order for a point x to be visible from x ∗ i then u must be increasing along the ray from x ∗ i to x which guarantees that all the points along the ray will be in the visible set. Without the minimum in t a point x could be consider visible by first moving along a ray towards x ∗ i and then follow a different viewpoint.

$$In \, \text{this case,} \, u = S S _ { \{ x _ { 1 } ^ { * }, \dots, x _ { r } ^ { * } \} } ^ { + } ( g ) \text{ is the solution of the following PDE}$$

$$\min \{ u ( x ) - g ( x ), \max _ { i = 1, \dots, r } \min _ { t \in [ 0, 1 ] } \nabla u ( x _ { i } ^ { * } + t ( x - x _ { i } ^ { * } ) ) \cdot ( x - x _ { i } ^ { * } ) \} = 0.$$

Despite being a non-local PDE, unlike the previous ones with a single viewpoint x ∗ , we still have a fast solver available: The solution u is given by

$$u = \min _ { i = 1, \dots, r } u _ { i },$$

where u i is the solution of

$$\min \{ u ( x ) - g ( x ), ( x - x _ { i } ^ { * } ) \cdot \nabla u ( x ) \} = 0.$$

This follows from noticing that

$$S S _ { \{ x _ { 1 } ^ { * }, \dots, x _ { r } ^ { * } \} } ^ { + } ( g ) = \min _ { i = 1, \dots, r } S S _ { x _ { i } ^ { * } } ^ { + } ( g ).$$

In addition, the following solution formula is also available

$$u ( x ) = \min _ { i = 1, \dots, r } \max \{ g ( y ) \ | \ y \in x _ { i } ^ { * } + t ( x - x _ { i } ^ { * } ) \in \Omega, t \in [ 0, 1 ] \}.$$

At this point, a natural question to ask is what other visibility definitions will lead to PDEs following the approach taken here. For instance, given 3 viewpoints { x , x ∗ 1 ∗ 2 , x ∗ 3 } a point can be considered visible if (i) it is seen by at least two viewpoints; (ii) it is seen by x ∗ 1 or both x ∗ 2 and x ∗ 3 (iii) it is seen by all viewpoints. All these can be computed efficiently computed by first determining the visibility of each viewpoint and then taking the appropriate combination of maximums and minimums. However, determining a corresponding PDE following the approach

considered here will in general fail. Consider for instance case (iii) where a point is visible if it is seen by all viewpoints. In this setting, one can no longer define star-shaped like sets as the visibility set may be disconnected (see Figure 4 for a simple example with two viewpoints). The fundamental difference is that it is no longer true that if a point x is visible then all points along the ray from x to the viewpoint are visible.

Figure 4. Visibility set from multiple viewpoints when a point is visible if it seen by at least one viewpoint (left) and by all the viewpoints (right).

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-82cf3066-50cb-475f-889c-9e5545b12081.jpg)

## 4. Convergent finite difference schemes

In this section, we discuss the numerical schemes used to solve the PDEs introduced in the previous section, focusing our attention on the visibility PDE (7). As we will see, the scheme proposed here is degenerate elliptic finite difference schemes for which there exists a well established convergence framework.

Before we begin we introduce some notation. For simplicity, we will assume we are working on the hypercube [ -1 1] , n ⊆ R n . We write x = ( x , . . . , x 1 n ) ∈ -[ 1 1] , n . The domain is discretized with a uniform grid, resulting in the following spatial resolution:

$$h \equiv \frac { 2 } { N - 1 },$$

where N is the number of grid points used to discretize [ -1 1]. , We denote by Ω h the computational domain which in our case reduces to [ -1 1] , n ∩ h Z n .

Our schemes are written as the operators F h [ u ] : C (Ω ) h → C (Ω ), where h C (Ω ) h is the set of grid functions u : Ω h → R . We assume they have the following form:

$$F ^ { h } [ u ] ( x ) = F ^ { h } ( u ( x ), u ( x ) - u ( \cdot ) ) \text{ \ for } x \in \Omega ^ { h }$$

where u ( ) corresponds to the value of u at points in Ω · h .

- 4.1. Finite difference for the visibility PDE. For simplicity, we present the scheme in the two-dimensional setting. The generalization to higher dimensions is straightforward.

Let x ∈ Ω . Define the vector h v ∗ = x -x ∗ for x ∈ Ω . If h x is one of the four grid points enclosing x ∗ , let ˜ = x x ∗ . Otherwise, let ˜ denote the intersection between x the line that passes through x and x ∗ and a line segment formed by 2 of the 8

neighbors of x . Then u v ∗ ( x ) = ( x -x ∗ ) · ∇ u x ( ) and its upwind approximation is given by

$$u _ { v } ^ { h } ( x ) \equiv \frac { u ( x ) - \mathcal { I } _ { h } u ( \tilde { x } ) } { | x - \tilde { x } | },$$

where I h is the piecewise linear Lagrange interpolant. The numerical scheme for the visibility PDE (7) is then given by

$$F ^ { h } [ u ] ( x ) = \min \{ u ( x ) - g ( x ), u _ { v } ^ { h } ( x ) \}, \ \ x \in \Omega ^ { h }.$$

- 4.2. Fast sweeping solver. We implement a fast sweeping solver to compute the solutions of (9). Solving the equation F h [ u ]( x ) = 0 for the reference variable, u x ( ), leads to the update formula

$$u ( x ) = \max \{ g ( x ), \mathcal { I } _ { h } u ( \tilde { x } ) \},$$

where ˜ was defined in the previous section. x Since all characteristic are straight lines and flow away from x ∗ , the domain Ω h only needs to be swept once (but in a very specific ordering). For simplicity, we will assume that x ∗ ∈ Ω . h Let u i,j denote the solution at x i,j where

$$x _ { i, j } = ( - 1 + ( i - 1 ) h, - 1 + ( j - 1 ) h ).$$

Set ( i ∗ , j ∗ ) such that x i ∗ ,j ∗ ≤ x ∗ &lt; x i ∗ +1 ,j ∗ +1 (here the inequalities are interpreted component-wise). Set as well u i ∗ ,j ∗ = g x ( ∗ ). The domain is then divided into four quadrants and each is swept in the following way:

- · i = i ∗ , . . . , N , j = j ∗ , . . . , 1 (sweeping bottom right square)
- · i = i ∗ , . . . , N , j = j ∗ , . . . , N (sweeping top right square)
- · i = i ∗ +1 , . . . , 1, j = j ∗ , . . . , 1 (sweeping bottom left square)
- · i = i ∗ +1 , . . . , 1, j = j ∗ , . . . , N (sweeping top left square)

Remark 4.1 . Alternatively, the solver can be seen as a direct consequence of the solution formula (6).

## 5. Convergence of Numerical Solutions

In this section we recall the notion of degenerate elliptic schemes and show that the solutions of the proposed numerical scheme converges to the solutions of (7) as the discretization parameter tends to zero. The standard framework used to establish convergence is that of Barles and Souganidis [BS91], which we state below. In particular, it guarantees that the solutions of any monotone, consistent, and stable scheme converge to the unique viscosity solution of the PDE.

- 5.1. Degenerate elliptic schemes. Consider the Dirichlet problem for the degenerate elliptic PDE, F u [ ] = 0, and recall its corresponding finite difference formulation:

$$\begin{cases} F _ { h } ( x, u ( x ), u ( x ) - u ( \cdot ) ) = 0, & x \in \Omega ^ { h }, \\ u ( x ) - g ( x ) = 0, & x \in \partial \Omega ^ { h }, \end{cases}$$

where h is the discretization parameter.

Definition 5.1. F h [ u ] is a degenerate elliptic scheme if it is non-decreasing in each of its arguments.

Remark 5.1 . Although the convergence theory in [BS91] is originally stated in terms of monotone approximation schemes (schemes with non-negative coefficients), ellipticity is an equivalent formulation for finite difference operators [Obe06].

Definition 5.2. The finite difference operator F h [ u ] is consistent with F u [ ] = 0 if for any smooth function φ and x ∈ Ω ,

$$\lim _ { h \to 0, y \to x, \xi \to 0 } F _ { h } ( y, \phi ( y ) + \xi, \phi ( y ) - \phi ( \cdot ) ) = F ( x, \phi ( x ), \nabla \phi ( x ) ).$$

Definition 5.3. The finite difference operator F h [ u ] is stable if there exists M &gt; 0 independent of h such that if F h [ u ] = 0 then ‖ u ‖ ∞ ≤ M .

Remark 5.2 (Interpolating to the entire domain) . The convergence theory assumes that the approximation scheme and the grid function are defined on all of Ω. Although the finite difference operator acts only on functions defined on Ω h , we can extend such functions to Ω h via piecewise linear interpolation. In particular, performing piecewise linear interpolation maintains the ellipticity of the scheme, as well as all other relevant properties. Therefore, we can safely interchange Ω and Ω h in the discussion of convergence without any loss of generality

- 5.2. Convergence of numerical approximations. Next we will state the theorem for convergence of approximation schemes, tailored to elliptic finite difference schemes, and demonstrate that the proposed scheme fits in the desired framework. In particular, we will show that the schemes are elliptic, consistent, and have stable solutions.

Proposition 5.4 (Convergence of approximation schemes [BS91]) . Let u denote the unique viscosity of the degenerate elliptic PDE F u [ ] = 0 with Dirichlet boundary conditions for which there exists a strong comparison principle. For each h , let u h denote the solutions of F h [ u ] = 0 , where the finite difference scheme F h [ u ] is a consistent, stable and elliptic scheme. Then u h → u locally uniformly on Ω as h → 0 .

Now, we check that our scheme is consistent, stable and elliptic.

Lemma 5.5 (Consistency) . The scheme is consistent.

Proof. It is sufficient to show that

$$( x - x ^ { * } ) \cdot \nabla u ( x ) = u _ { v } ^ { h } ( x ) + \mathcal { O } ( h )$$

which follows immediately from a Taylor expansion argument and the definition of u h v . glyph[square]

Lemma 5.6 (Stability) . Suppose g is bounded. Then the scheme is stable.

Proof. Since the solution u h satisfies

$$u ^ { h } ( x ) = \max \{ g ( x ), \mathcal { I } _ { h } u ^ { h } ( \tilde { x } ) \}, \ \ x \in \Omega ^ { h },$$

it follows that g x ( ∗ ) ≤ u h ( x ) ≤ ‖ ‖ g

$$& \max \{ g ( x ), \mathcal { I } _ { h } u ^ { h } ( \tilde { x } ) \}, \quad x \in \Omega ^ { h }, \\ & \vdots \| g \|.$$

$$\sqcup$$

Lemma 5.7 (Ellipticity) . The scheme is elliptic.

Proof. The term u x ( ) -g x ( ) is trivially elliptic. Since ˜ belongs to the line segment x of two grid points, I h u x (˜) is a convex combination of neighboring grid values and therefore u h v is elliptic. Hence F h , being the minimum of two elliptic schemes, is also elliptic. glyph[square]

Theorem 5.8. Suppose g ∈ C (Ω) . Then the solutions of (9) converge locally uniformly on Ω as h → 0 to the unique viscosity solution of (7) along with u x ( ∗ ) = g x ( ∗ ) .

Proof. By Lemmas 5.5, 5.6 and 5.7, we see that F h (9) is consistent, stable and elliptic.

In order to apply Proposition 5.4, our PDE must satisfy a strong comparison principle which is not the case here. However, inspecting the proof of Proposition 5.4 in [BS91], one notices that it is enough to show that u ≤ u in Ω, where

$$\overline { u } ( x ) = \lim _ { h \to 0, y \to x } u ^ { h } ( x ) \text{ and } \underline { u } ( x ) = \liminf _ { h \to 0, y \to x } u ^ { h } ( x ).$$

This will follow from Proposition 3.9 by proving that u x ( ∗ ) ≤ g x ( ∗ ). Indeed, due to the continuity of g ,

$$\begin{array} { c c c } \int \text{the continuity of } g, \\ \overline { u } ( x ^ { * } ) = \lim \sup _ { \substack { u ^ { h } ( x ^ { * } ) \\ h \to 0, y \to x ^ { * } } } \\ \overline { \substack { = \lim \sup _ { \substack { g ( x ) \\ \epsilon \to 0 \\ B ( x ^ { * }, \epsilon ) } } } } \\ \overline { \substack { = g ( x ^ { * } ) } } \end{array}$$

## 6. Numerical results

In this section we present the numerical results. We focus on solving equation (7) as it is the one we are mainly interested since the sublevel sets of its solution provide us with the visibility set. We present results both in two and three dimensions.

Example 6.1. We start with a simple example to show a numerical convergence test. We take x ∗ = ( -1 , -1) as the viewpoint and consider as the obstacle function the cone g x ( ) = -√ x 2 1 + x 2 2 and therefore each level-set of g corresponds to a circle with center at the origin and a different radius. The exact solution was obtained using (6). The difference between the numerical solution and the exact solution in the l ∞ norm is presented in Table 1, where we also confirm the expected first order convergence. Moreover, in Figure 5, we plot the level sets of both g and the numerical solution, as well as their respective surface plots. As we can see, the visibility set is computed for each level set of g .

Figure 5. Level sets of the obstacle g and the solution u of (7) (left) and the respective surface plots (center and right).

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-c30b195e-eea5-44d0-94c1-9024634dfaee.jpg)

Table 1. Errors and order of convergence for Example 6.1.

|    N | h               | Error           | Order   |
|------|-----------------|-----------------|---------|
|   32 | 1 . 29 × 10 - 1 | 9 . 12 × 10 - 2 | -       |
|   64 | 6 . 35 × 10 - 2 | 4 . 49 × 10 - 2 | 1.02    |
|  128 | 3 . 15 × 10 - 2 | 2 . 23 × 10 - 2 | 1.01    |
|  256 | 1 . 57 × 10 - 2 | 1 . 11 × 10 - 2 | 1.01    |
|  512 | 7 . 83 × 10 - 3 | 5 . 54 × 10 - 3 | 1.00    |
| 1024 | 3 . 91 × 10 - 3 | 2 . 76 × 10 - 3 | 1.00    |
| 2048 | 1 . 95 × 10 - 3 | 1 . 38 × 10 - 3 | 1.00    |
| 4096 | 9 . 77 × 10 - 4 | 6 . 91 × 10 - 4 | 1.00    |

Example 6.2. In this example we are interested in computing the visibility set where we have four different obstacles: two squares with centers ( -1 5 . , -0 2), . (0 , 0 3) and side lengths 0 5, 1 respectively and two circles with origins ( . . -0 3 . , 1 5), . ( -0 3 . , -1 4) and radius 0 5. . . We achieve this by considering the obstacle function

$$g ( x ) = - \min \left \{ g _ { 1 } ( x ), g _ { 2 } ( x ), g _ { 3 } ( x ), g _ { 4 } ( x ) \right \}$$

where

$$g _ { 1 } ( x ) & = 2 \max \{ | x _ { 1 } + 1. 5 |, | x _ { 2 } + 0. 2 | \}, \\ g _ { 2 } ( x ) & = \max \{ | x _ { 1 } |, | x _ { 2 } - 0. 3 | \}, \\ g _ { 3 } ( x ) & = \sqrt { ( x _ { 1 } + 0. 3 ) ^ { 2 } + ( x _ { 2 } - 1. 5 ) ^ { 2 } }, \\ g _ { 4 } ( x ) & = \sqrt { ( x _ { 1 } + 0. 3 ) ^ { 2 } + ( x _ { 2 } + 1. 4 ) ^ { 2 } }, \\ \cdot \ \sim \cdot \ \cdot \ \cdot \ \cdot \ \cdot \ \nu \ \cdot \ \cdot \ \nu \ \cdot \ \cdot \ \nu \ \cdot \ \cdot \ \cdot \ \nu \ \cdot \ \cdot \ \cdot \.$$

and looking into the 0 5 level set. . We first solve (7) with x ∗ = ( -1 5 . , -1 4) and . x ∗ = (1 5 . , -0 3). . We compute as well the visibility set with respect to { x , x ∗ 1 ∗ 2 } = { -( 1 5 . , -1 4) . , (1 5 . , -0 3) . } when a point is consider visible if it is seen by any of the viewpoints and by both viewpoints simultaneous. The former corresponds to the solution of (8). All results are displayed in Figure 6.

Example 6.3. We consider a simple three-dimensional example where the obstacle function is given by

$$g ( x ) = - \min \{ g _ { 1 } ( x ), g _ { 2 } ( x ) \}$$

where

$$g _ { 1 } ( x ) = \max ( | x _ { 1 } + 2 |, | x _ { 2 } |, x _ { 3 } ) - 1 \ \text{ and } \ g _ { 2 } ( x ) = \max ( | x _ { 1 } - 3 | ), | x _ { 2 } - 4 |, x _ { 3 } ) - 2.$$

◦

It can be interpreted as the visibility set of a 360 camera in the middle of two buildings. The results are displayed in Figure 7.

Example 6.4. The Stanford 3D Scanning Repository provides a dataset of 35947 distinct points that form what is known as the 'Stanford Bunny'. In this example we considered it as the obstacle by taking the function g to be the signed distance function to the dataset points. The results are displayed in Figure 8.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-ad21563d-7cd6-4160-9a08-d812808547c2.jpg)

Figure 6. Results for Example 6.2: solution to (7) with x ∗ = ( -1 5 . , -1 4) (top-right); solution to (7) with . x ∗ = (1 5 . , -0 3) (top-. left); solution to (8) with { x , x ∗ 1 ∗ 2 } = { -( 1 5 . , -1 4) . , ( -1 5 . , -1 4) . } (bottom-left), i.e., set of points visible by any of the viewpoints; set of points visible by both viewpoins (bottom-right). All visibility sets are displayed in red, while the obstacles are displayed in black.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-35bdf94b-c76b-49d7-ac95-e6dec06da9c5.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-39ff68f9-6a98-435f-8661-c300ecf9d985.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-a184a3bc-23f0-4876-9f1a-0f9dfb8db07f.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-98d62bd1-6ec1-4ec8-b12c-e546208beae3.jpg)

Figure 7. Results for Example 6.3. The obstacles are displayed in blue, while the contour of the visibility set is displayed in red.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-27dceb62-66ec-47cb-89e9-d390b8d1fa98.jpg)

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-f4e19b68-cea3-4ff2-b908-f6606f2a343e.jpg)

Figure 8. Results for Example 6.4. The obstacles are displayed in blue, while the contour of the visibility set is displayed in red.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00578v1-figure-ae852242-e4fe-464f-9754-d007b864ba02.jpg)

## 7. Conclusions

In this article, we described a new simpler PDE to compute the visibility set from a given viewpoint given a set of known obstacles. We proposed a finite difference numerical scheme to compute its solution and showed its convergence. We discuss the generalization of the result to multiple viewpoints and present a PDE for the visibility set where a point is visible if it is seen by at least one of many viewpoints. Numerical examples of different visibility sets computed as the solution of the new proposed PDE in both two and three dimensions are presented.

## Acknowledgments

This material is based upon work supported by the Air Force Office of Scientific Research under award number FA9550-18-1-0167. The second author thanks the hospitality of the Mathematics and Statistics department of McGill University during its visit where the work for this paper was carried out.

## References

| [AS96a]   | Pankaj K. Agarwal and Micha Sharir, Ray shooting amidst convex polygons in 2d , Journal of Algorithms 21 (1996), no. 3, 508 - 519.                                                                                  |
|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AS96b]   | Pankaj K. Agarwal and Micha Sharir, Ray shooting amidst convex polyhedra and poly- hedral terrains in three dimensions , SIAM J. Comput. 25 (1996), no. 1, 100-116. MR 1374052                                      |
| [BS91]    | Guy Barles and Panagiotis E. Souganidis, Convergence of approximation schemes for fully nonlinear second order equations , Asymptotic Anal. 4 (1991), no. 3, 271-283. MR 92d:35137                                  |
| [CIL92]   | Michael G. Crandall, Hitoshi Ishii, and Pierre-Louis Lions, User's guide to viscosity solutions of second order partial differential equations , Bull. Amer. Math. Soc. (N.S.) 27 (1992), no. 1, 1-67. MR 92j:35050 |
| [CT97]    | Satyan Coorg and Seth Teller, Real-time occlusion culling for models with large oc- cluders , Proceedings of the 1997 Symposium on Interactive 3D Graphics (New York, NY, USA), I3D '97, ACM, 1997, pp. 83-ff.      |
| [CT05]    | Li-Tien Cheng and Yen-Hsi Tsai, Visibility optimization using variational approaches , Commun. Math. Sci. 3 (2005), no. 3, 425-451.                                                                                 |

| [DDTP00]   | Fr´do e Durand, George Drettakis, Jo¨lle e Thollot, and Claude Puech, Conservative visibility preprocessing using extended projections , Proceedings of SIGGRAPH 2000 (July 2000), Held in New Orleans, Louisiana.                                                                                                                |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [HZ00]     | Aaron Hertzmann and Denis Zorin, Illustrating smooth surfaces , 2000.                                                                                                                                                                                                                                                             |
| [Koi04]    | Shigeaki Koike, A beginner's guide to the theory of viscosity solutions , MSJ Memoirs, vol. 13, Mathematical Society of Japan, Tokyo, 2004. MR 2084272 (2005d:35002)                                                                                                                                                              |
| [KT08]     | Chiu-Yen Kao and Richard Tsai, Properties of a level set algorithm for the visibility problems , Journal of Scientific Computing 35 (2008), no. 2, 170-191.                                                                                                                                                                       |
| [LT18]     | Louis Ly and Yen-Hsi Richard Tsai, Autonomous exploration, reconstruction, and surveillance of 3d environments aided by deep learning , CoRR abs/1809.06025 (2018).                                                                                                                                                               |
| [LTC06]    | Yanina Landa, Richard Tsai, and Li-Tien Cheng, Visibility of point clouds and map- ping of unknown environments , Advanced Concepts for Intelligent Vision Systems (Berlin, Heidelberg) (Jacques Blanc-Talon, Wilfried Philips, Dan Popescu, and Paul Scheunders, eds.), Springer Berlin Heidelberg, 2006, pp. 1014-1025.         |
| [Obe06]    | Adam M. Oberman, Convergent difference schemes for degenerate elliptic and par- abolic equations: Hamilton-Jacobi equations and free boundary problems , SIAM J. Numer. Anal. 44 (2006), no. 2, 879-895 (electronic). MR MR2218974 (2007a:65173)                                                                                  |
| [OS88]     | Stanley Osher and James A. Sethian, Fronts propagating with curvature-dependent speed: algorithms based on Hamilton-Jacobi formulations , J. Comput. Phys. 79 (1988), no. 1, 12-49.                                                                                                                                               |
| [SA97]     | J. A. Sethian and D. Adalsteinsson, An overview of level set methods for etching, deposition, and lithography development , IEEE Transactions on Semiconductor Man- ufacturing 10 (1997), no. 1, 167-184.                                                                                                                         |
| [Set99]    | J. A. Sethian, Level set methods and fast marching methods , second ed., Cambridge Monographs on Applied and Computational Mathematics, vol. 3, Cambridge Uni- versity Press, Cambridge, 1999, Evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science. MR MR1700751 (2000c:65015) |
| [TCO + 04] | Y.-H. R. Tsai, L.-T. Cheng, S. Osher, P. Burchard, and G. Sapiro, Visibility and its dynamics in a pde based implicit framework , J. Comput. Phys. 199 (2004), no. 1, 260-290.                                                                                                                                                    |
| [VTS14]    | Luca Valente, Yen-Hsi R. Tsai, and Stefano Soatto, Information-seeking control under                                                                                                                                                                                                                                              |

Department of Mathematics and Statistics, McGill University, 805 Sherbrooke Street West, Montreal, Quebec, H3A 0G4, Canada ( adam.oberman@mcgill.ca ).

Department of Mathematics, University of Michigan, 530 Church St. Ann Arbor, MI 48105 ( saldanha@umich.edu ).
Adam Oberman Tiago Salvador
A Partial Differential Equation Obstacle Problem for the Level Set Approach to Visibility
In this article we consider the problem of finding the visibility set from a
given point when the obstacles are represented as the level set of a given
function. Although the visibility set can be computed efficiently by ray
tracing, there are advantages to using a level set representation for the
obstacles, and to characterizing the solution using a Partial Differential
Equation (PDE). A nonlocal PDE formulation was proposed in Tsai et. al.
(Journal of Computational Physics 199(1):260-290, 2004): in this article we
propose a simpler PDE formulation, involving a nonlinear obstacle problem. We
present a simple numerical scheme and show its convergence using the framework
of Barles and Souganidis. Numerical examples in both two and three dimensions
are presented.