The Visible-Volume Function of a Set of Cameras is Continuous, Piecewise Rational, Locally Lipschitz, and Semi-Algebraic in All Dimensions

The visible-volume function assigns to a configuration of cameras and a flexible environment in a convex room the volume that can be supervised by the cameras. It is of interest to configure the cameras and the environment in such a way that the visible volume is maximized. Some methods of global optimization can take profit from desirable analytic properties of the visible-volume function. Earlier work has only considered this function in dimensions two and three or for static environments implicitly defined by level-set functions. In this paper it is shown, that the visible-volume function for a flexible environment modeled explicitly by a parametrized simplicial complex is continuous, piecewise rational, locally Lipschitz, and semi-algebraic in all dimensions.


Introduction
This paper reveals a number of analytic properties of the visible-volume function (formally defined below).For an adjustable camera system in a room with movable obstacles, this function assigns to each parameter combination the volume that can be supervised by the cameras.A natural goal is to maximize the visible-volume function over all adjustable parameters.This paper restricts attention to the analytic properties of the visible-volume function in an environment modeled by a simplicial complex with an adjustable embedding in some bounded convex room.The analytic properties are of interest, since they are important for the convergence guarantees for various numerical global optimization approaches.
The famous art-gallery problem (AGP) is closely related to the maximization of the visible volume.In the AGP one seeks for the minimal number of cameras with 360 • view and their positions so that they together see the complete volume inside a simple two-dimensional polygon with n vertices.The famous simple proof in [10] of an earlier result in [6] shows-via a 3-coloring of a triangulation-that n/3 cameras suffice.However, the recent result in [1] shows that the AGP is as difficult as to decide whether an outer-description of a semi-algebraic set contains a real point.This implies that the analysis in this paper can probably not be simplified.
Optimizing coverage induced by camera placement has been investigated using various modeling techniques for a very long time, see [14] for a survey and [13] for a more recent thesis.The geometric computation of shadows on a surface (in the sense of day-to-day language) produced in three dimensions by a light at a certain position and some occluding 3D-objects dates back to at least 1977 [7].That paper was motivated by the correct graphical display of the illumination of architectural designs and similar issues in computer graphics.I mention this since the geometric description of a shadow of a simplex is a core component of this paper.In most applications today, the actual function to be optimized is usually called the relevance function and need not coincide with the visible volume.For example, points can have a weight according to their importance or distance to the camera.Still, common to most approaches is that the dependence of the visible volume on the camera system parameters must be captured in one way or another.This paper focuses on the visible-volume function and suggests a framework for its analysis in arbitrary dimensions.
In many practical instances like the one in [13], the visible-volume function must be considered as a black-box function, i.e., a closed-form formula is not available, the computation of a single function value is costly, and (sub)gradients-if they existcannot simply be calculated from formulas.For the global optimization of black-box functions, various methods have been proposed, see [4] for a more recent one.Although it is possible to apply such methods and hope for good results even if a convergence proof is not available, I find it mathematically desirable to know a priori analytic properties of the function to be optimized that guarantee convergence.The criterion in [4] is, e.g., that the function is continuous, smooth on a dense subset of the domain, and locally Lipschitz or semi-algebraic.
In [12], the visible-volume function is analyzed for the case of an environment modeled by non-convex polygons in dimension two.In that paper, the independent variable of the visible-volume function is just the position of the camera, since it is assumed that it has a 360-degree view.The result is that the visible-volume function is continuous as well as smooth and locally Lipschitz in the camera position on a dense subset of the domain.Newer developments also consider environments in dimension three containing obstacles and more camera parameters like field of view and orientation of multiple cameras [13].The visible-volume function is again continuous and smooth almost everywhere.
The only work I have found for general dimensions uses a different set-up based on the level-set method [15]: Inside a compact domain there are opaque solid obstacles implicitly given via a Lipschitz-continuous level-set function, a function that is negative in the interior and positive on the exterior of the obstacles [5].A possible level-set function is the signed-distance function that assigns to each point the shortest distance to the boundary of some obstacle; it receives a negative sign if the point is inside the obstacle and a positive sign if it is outside.In that paper, the independent variables of the visible-volume function are again restricted to the positions of one or more cameras, i.e., the cameras possess omni-directional vision.Visibility of one point from another can be decided by checking whether the infimum of the level-set function on the connecting straight line (the visibility function) is positive.The visible-volume function then takes the form of an integral of the Heaviside function of the visibility function over the domain.It is shown that, under certain additional conditions on the visibility function (which the authors call "no fattening [of the visibility level sets]" [5, p. 5]), that the visible-volume function inherits Lipschitz-continuity from the levelset function.One may see a problem in the fact that the additional condition in that paper is a condition on the visibility function, which is not part of the input data.
Why bother at all about higher dimensions or a non-static environment?First, in dimension four the visible volume covered over time can be used to model video surveillance with time being the fourth dimension.Concerning the non-static environment the idea is that natural, usually adjustable camera parameters like field of view or direction can be modeled by obstacles inside the camera system (aperture blades).However, for this paper the true motivation was clearly curiosity: Is the dimension or a static environment relevant at all for some interesting analytic properties of the visible-volume function to hold, or is there a general mathematical principle that guarantees an interesting result in all dimensions by a unified argument?What is the most explicit representation of the visible-volume function?Does it belong to a special class of functions?
How about generalizing the techniques from [12,13]?In [12] so-called inflection segments are the basic building blocks of the analysis.Inflection segments are used to partition the interior of the non-convex polygon into regions in which the visible-volume function depends smoothly on the camera position.Generalizing their approach to higher dimensions would require to consider inflection hypersurfaces generating possibly non-convex polytopes as regions.This has in principle been carried out in a different language in [13, Tables 2.3-2.5] for dimension three by an extensive classification of so-called vertex-incidence surfaces.Following those lines, the number of cases that would have to be considered in a similar table would be enormous even in dimension four.For general dimension this seems intractable.To replicate the full result in this paper with the level-set method in [5] one would have to construct an explicit parametrized level-set function for movable obstacles that are described explicitly via parametrized embeddings of simplicial complexes.At least for me it is not obvious how to proceed along those lines.Yet, it would be interesting to see the result of this purely analytical approach.
This paper focuses on finite, discrete, explicit descriptions of the environment.It is shown by a unified method in a fairly general setting with obstacles, explicitly defined as parametrized pure simplicial complexes of codimension-one, that the visible- ′ p Fig. 1 The "visible-subset function" is not even continuous: an arbitrarily small left-movement of p (which is located on the line from 7 to 9) to p makes points visible that are "far away" from the points visible from p; the increase of the visible-volume, however, will be arbitrarily small for a sufficiently small movement; the continuity of the visible volume is lost as soon as there is a constant-degree diffraction at corners volume function, depending on the positions of the cameras and the environment is indeed continuous, smooth almost everywhere, locally Lipschitz and semi-algebraic in all dimensions.The methodology belongs to the wide field of discrete geometry-a combination of the basic theory of oriented matroids [3,16], the basic theory of triangulations of point configurations [9], and the basic theory of semi-algebraic sets [2].The actual result is even more specific: The domain of the visible-volume function can be stratified into open cubical cells so that the visible-volume function is a smooth rational function on each cell with degree at most cubical in the dimension.All structural results follow from this explicit representation, which goes beyond the results in [5].Even in dimension two and three this is, to the best of my knowledge, the most concrete description of the visible-volume function.
An important remark is in place here: the analytic properties of the visible-volume function in the main result cannot be derived via splitting it into the composition of the "visible-subset function" (with the Hausdorff metric on the set of subsets) and the "volume-of-subsets function".This is simply because the "visible-subset function" is not even continuous.See Fig. 1 for visual evidence in dimension two.The same figure shows that if one considers an arbitrary positive amount of diffraction, then the visible-volume function itself becomes discontinuous: Indeed, while moving the camera position, in the first moment one can look through the obstacles at all, a cone will be visible with interior angle of at least the diffraction angle.Hence, in order to prove the main result straight-line geometric optics has to be assumed and exploited.
Moreover, this shows that the results in this paper are in sharp contrast to the discontinuous dependence of image features on the view point, as is investigated in Computer Vision (see, e.g., [8]).Thus, the combination of methods in this paper is tailor-made specifically for the straight-line-optics visible-volume function.

Preliminaries
This paper uses elementary notions and facts from the theories of semi-algebraic sets, oriented matroids, and triangulations.This section gives a brief overview over these tools in a phrasing adapted to the purposes of this paper.In order to distinguish the known from the novel, the terms "notion" and "fact" are used instead of "definition" and "theorem".
Semi-algebraic sets (over the reals) arise as solution sets of polynomial equations and inequalities and enjoy a number of convenient closure and decomposition properties.
Notion 2.1 (semi-algebraic sets and functions) A subset S ⊆ R d is a basic semialgebraic set (over the reals), if there are finitely many polynomials The following, specialized version of the stratification theorem for semi-algebraic sets provides the basis for the piecewise description of the visible-volume function.Oriented matroids encode the combinatorics of finite geometric structures like finite point or vector configurations or finite arrangements of affine or linear hyperplanes.An oriented matroid may be defined in various ways all of which can be transformed into one another.In this paper, only realizable oriented matroids are used so that it is enough to define them via the geometric properties of point configurations or arrangements of hyperplanes (see [3] for a more general treatment).In the following, the rank is defined as r := d + 1. Notion 2.4 (oriented matroid of a hyperplane arrangement) Let H = (H i ) i∈I be a finite linear hyperplane arrangement in R r with at least one basis, i.e., a r -subset of hyperplanes with linearly independent normals labeled by a label set I (multiple hyperplanes are allowed, i.e., distinct labels may label identical hyperplanes).The arrangement is oriented if for each hyperplane H we have fixed the open positive halfspace H + and the open negative halfspace H − .We denote by the zero-set H 0 the hyperplane itself.A signature σ : I → {−, 0, +} is a function that assigns to each label a sign from {−, 0, +}, where "+" and "−" are interpreted as "+1" and "−1".Each such signature induces a region R σ of the arrangement via which may be empty.A covector of H is a signature σ whose region R σ is nonempty.A covector with an inclusion maximal number of zero-components is called a cocircuit of H .
Two hyperplane arrangements with label set I are combinatorially equivalent if they have identical sets of covectors (or equivalently, identical sets of cocircuits).The combinatorial equivalence class of H is called the oriented matroid of H . Any choice of a hyperplane at infinity yields an affine oriented matroid where only the covectors are considered that are on the positive side of the hyperplane at infinity.The intersection of all hyperplanes not at infinity with the positive hemisphere defined by the hyperplane at infinity followed by a stereographic projection yields an affine hyperplane arrangement in dimension [16,Sect. 7.1.3 (rephrased)].

Notion 2.5 (oriented matroid of a point configuration)
Let A = (v j ) j∈J be a finite point configuration in R d with at least one basis, i.e., a r -subset of points forming a ddimensional simplex, labeled by a label set J (multiple points are allowed, i.e., distinct labels can label identical points).Each signature σ : J → {−, 0, +} on J defines a set of hyperplanes H σ consisting of all affine hyperplanes H in R d with v j ∈ H σ ( j) for all j ∈ J .A covector of A is a signature σ for which H σ is non-empty.A covector with an inclusion-maximal number of zero components is called a cocircuit of A.
Two point configurations with label set J are combinatorially equivalent if they have identical sets of covectors (or equivalently, identical sets of cocircuits).The combinatorial equivalence class of A is called the oriented matroid of A. For a matrix 123 Remark 2. 6 In this paper, oriented matroids are identified with their realization spaces in the space of matrices, which is no problem for realizable oriented matroids.
The following is immediate from the definition: Fact 2.7 (finiteness property of oriented matroids) For finite label sets I and J there exists only a finite number of distinct oriented matroids of hyperplane arrangements and distinct oriented matroids of point configurations labeled by I and J , respectively.
In the theory of oriented matroids, it does not make a difference whether one considers the oriented matroid of a hyperplane arrangement or the oriented matroid of a point configuration.Moreover, in addition to covectors and cocircuits, there are other structures that specify an oriented matroid.For example, prescribing the set of covectors of a hyperplane arrangement or a point configuration is equivalent to prescribing all determinants of r -many rows of W or r -many columns of V (the chirotope of the oriented matroid) [16,Sect. 7.2.3].This imposes polynomial equations and inequalities of degree r among the entries of the matrices.Therefore, each set of matrices inducing mutually combinatorially equivalent affine hyperplane arrangements or point configurations, respectively, is a semi-algebraic set [16,Sect. 7.3.2].Fact 2.8 (realization spaces of oriented matroids are semi-algebraic) Each combinatorial equivalence class in R I ×r of all matrices W with mutually combinatorially equivalent hyperplane arrangements H (W ) is a semi-algebraic set.Each combinatorial equivalence class in R r ×J of all matrices V with mutually combinatorially equivalent point configurations A(V ) is a semi-algebraic set.
Triangulations of finite point configurations are dissections of the convex hull of the point configuration into simplices all of whose vertices are contained in the point configuration so that any two simplices intersect properly.More formally: Notion 2.9 (triangulations of point configurations) LetA be a finite point configuration in R d of affine dimension d labeled by a label set J (multiple points are allowed, i.e., distinct labels may label identical points).For an r -subset S of J the subconfiguration S is the subconfiguration of points in A with labels in S. If S has affine dimension d, it is spanning.In this case, S is called an (abstract) d-simplex, and S is called a (geometric) d-simplex.Two d-simplices (abstract or geometric) intersect properly in A if the relative interiors of any two geometric faces have empty intersection.A triangulation of A is a family T of properly intersecting abstract d-simplices in J so that the union of all corresponding geometric simplices equals conv A [9, Definition 2.3.1 (rephrased)].
The main connection of triangulations to oriented matroids is the following: whether or not a family of r -subsets of J forms a triangulation of A only depends on the oriented matroid of A, not on the exact coordinates.In particular, the set of all point configurations on the same label set having identical sets of triangulations is, as the union of (realization spaces of) oriented matroids of point configurations, a semi-algebraic set.Fig. 2 The room and an intersection-free embedding of an environment in the room

Problem Statement and Main Result
In this section, the main objects of study are introduced, the notation is fixed, and the main problem is formalized.
Let d be the ambient dimension, and let P ⊂ R d be a d-polytope, which is called the room (see Fig. 2, left).Let J be a set, and let F be an abstract simplicial complex on J of pure codimension one, the abstract environment complex.Moreover, let e : J → P be an embedding of the vertices of F into the room.Given such an embedding e, we call the point configuration A(e) := e(J ) the vertices of the geometric environment complex.For a (k − 1)-simplex F = { j 1 , j 2 , . . ., j k } ∈ F in the abstract environment complex we obtain its geometric embedding F(e) := conv {e( j 1 ), e( j 2 ), . . ., e( j k )}.The geometric environment complex in the room is then F (e) := {F(e) : F ∈ F }. Its geometric realization |F (e)| := F∈F F(e) is the union of all geometric embeddings of its simplices.We call an embedding e intersection-free if any two geometric embeddings of open simplices of any dimension have empty intersection (see Fig. 2 right for an example).In particular, for intersection-free embeddings all geometric simplices F(e) have dimension card(F) − 1, where card(F) is the cardinality of the abstract simplex F.
Let E ⊂ (P) J be any semi-algebraic subset of all intersection-free embeddings, equipped with the standard subspace topology on (R d ) J .

Remark 3.1
The subset of intersection-free embeddings is a semi-algebraic set: Each intersection point x of two open geometric simplices F(e) and F (e) has two representations in terms of the strictly positive barycentric coordinates of the simplices.More specifically, the geometric simplices F(e) = conv {e( j 1 ), e( j 2 ), . . ., e( j k )} and F (e) = conv {e( j 1 ), e( j 2 ), . . ., e( j )} have an interior intersection point if and only if the following holds: The set of all e for which this condition is true for a given pair of geometric simplices is consequently the projection of a semi-algebraic set, which is a semi-algebraic set.Moreover, the set of all not intersection-free e is the union of the semi-algebraic sets over all pairs of simplices, thus a semi-algebraic set.The set of all intersection-free embeddings e is, as the complement of this semi-algebraic set, again a semi-algebraic set.Note that all further considerations do not depend on the fact that we only consider intersection-free embeddings.

Remark 3.2
We do not model the usual camera parameters "field of view" or "orientation" separately because they can be simulated by movable "aperture blades" in the geometric environment complex.The affine hull of a geometric simplex S is the smallest affine subspace containing S. For a geometric facet F ∈ F (e) and a point x ∈ P\aff F(e), the polyhedron cone F (x) is defined as the cone and pyram F (x) is defined as the pyramid over F with apex x.For a subset X ⊂ P, the notation X is used for the topological closure and X • for the topological interior.The intersection of the face or total shadow with the room is called the cut-off (face or total) shadow.
Figures 4 and 5 illustrate the cut-off shadows.Parts of the room may be in the shadow of more than one face.The face shadow is a polyhedron, and its supporting hyperplanes are spanned by the face and the facets of the face together with the camera position.Note that if there is diffraction, then even in dimension two the invisible points are not anymore just the union of all face-shadows: adjacent segments in the environment would formally have a cone behind their intersection point that is not in the union of their shadows.However, that cone is clearly invisible in reality.Thus, even for arbitrarily small positive diffraction (for which the main theorem is false) the construction of this paper fails at this point.The goal is to find analytic properties of the visible-volume function.In particular, for randomized local-search maximization methods it is of interest whether or not the visible-volume function is continuous and C ∞ almost everywhere.Since the graph of Additionally, the only possibly non-smooth parts of the feasible domain are the boundaries between different strata.Since V ( • , • ) is bounded and continuous, each rational function extends to the boundary of each stratum, where it is equal to V ( • , • ).Since rational functions are continuously differentiable on their complete domain, the onesided directional derivatives of V ( • , • ) restricted to the closure of each stratum are bounded for all directions into the stratum.Now, each stratum is in the boundary of only finitely many strata, so that the one-sided directional derivatives are bounded everywhere uniformly for each direction into the feasible domain.This implies that V ( • , • ) is locally Lipschitz.Therefore, we have:

Corollary 3.8 The visible-volume function V ( • , •
) is piecewise smooth, in particular C ∞ almost everywhere.Moreover, it is semi-algebraic and locally Lipschitz.
In the next section, we will prove this theorem in eight steps by an explicit construction that generates a concrete formula for V ( • , • ) via a (fairly fine) triangulation of the room.Note that the whole (convex!) room will be subdivided into convex regions and then triangulated.Thus, it will never be necessary to triangulate non-convex objects (which may fail starting in dimension three [9, Sect.3.6]).

Proof of the Main Theorem
This section is devoted to the proof of the main theorem.Recall that r := d + 1 is the rank of the room P. The proof idea is as follows: The set of feasible camera configurations can be partitioned into finitely many equivalence classes given by combinatorial equivalence of the induced hyperplane arrangement of all "visibility boundaries" and their intersection points (derived from oriented-matroid theory).Inside each of these finitely many equivalence classes the visible subset can be triangulated by the same (combinatorial) triangulation.Thus, in such an equivalence class the visible-volume function varies like the sum of the positive simplex-volumes over all visible simplices in the triangulation, which is essentially a determinant in the coordinates of the vertices of the simplices (derived from triangulation theory).Tracing back the data of these coordinates to the set of feasible camera configurations yields a rational function.
Each equivalence class is a semi-algebraic set (derived from oriented-matroid theory and semi-algebraic-set theory) that can be further stratified into cubical cells (derived from semi-algebraic-set theory).Note that the final stratification is necessary, since a complete equivalence class can be complicated, e.g., not connected [16,Sect. 7.3.2].The formal proof is structured into eight steps.
Step 1 The first part shows that the visible-volume function is continuous, which follows immediately from the definition via the face shadows.

Lemma 4.1 The visible-volume function is continuous.
Recall Fig. 1 shows that the visible-subset function is not continuous, so that this result specifically holds for the volume, not for the visible subset of the room.

Proof of Lemma 4.1
It is enough to show that the cut-off total shadow is continuous.Each face shadow intersected with the room, the cut-off face-shadow, is a polytope whose outer description is continuous in the camera configuration.Thus, its volume function is bounded and continuous.By the inclusion-exclusion formula for the volume measure, the volume of the total shadow equals the sum of all cut-off face-shadow volumes minus the sum of all volumes of intersections of two cut-off face shadows plus the sum of all volumes of intersections of three cut-off face shadows … plus/minus the volume of the intersection of all cut-off face shadows.All appearing intersections are intersections of polytopes.Thus, all volumes in the inclusion-exclusion formula are continuous.Thus, the visible-volume function as a finite sum of continuous functions is continuous.
Step 2 For any feasible camera configuration (p, e) ∈ D and a (d − 1)-face F of the environment complex F , consider the affine hyperplane H(F(e)) spanned by the corresponding geometric face F(e).It is called the transversal visibility plane of F with respect to (p, e).Moreover, for any feasible camera configuration (p, e) ∈ D and a (d − 2)-face F of the environment complex F with p / ∈ aff F (e) (only these bound a (d −1)-face producing a shadow), consider the affine hyperplane H(F (e), p) spanned by the corresponding geometric face F (e) and the camera position p.It is called the longitudinal visibility plane of F with respect to (p, e).Since the environment complex has pure dimension d − 1, all (d − 2)-faces of the environment complex bound some (d − 1)-face of the environment complex.Now let H (p, e) be the affine hyperplane arrangement of all transversal and longitudinal visibility planes together with all facet-supporting hyperplanes of the room.They form the "visibility boundaries" mentioned in the proof idea.We consider this arrangement labeled by a label set I .This way, hyperplanes spanned by distinct simplices are distinguished, even if they are identical as subsets of R d .The label set is independent of (p, e), since the environment complex F is independent of (p, e) by assumption.See Fig. 6 The coefficients of the coordinates of x as well as the absolute term are, using development of the determinant by the last column, determinants of d × d matrices whose entries are coordinates of points in A(e) ∪ {p}.Thus, they are multilinear polynomials of degree at most d in the camera configuration.Note that, by construction, each open region of the hyperplane arrangement is either completely contained in the total shadow (invisible from p) or completely in the complement of the total shadow (visible from p).This is because all supporting hyperplanes of facets of these shadows have been added to H (p, e).Thus, the visible volume is the sum of volumes of all d-dimensional regions that are inside the room and outside the total shadow, which is the statement of the following lemma.H (p, e) and H (p , e ) are combinatorially equivalent (Notion 2.4).The equivalence class of (p, e) with respect to "∼ H " is denoted by M H (p, e).
Let M H be the set (see Fact 2.7) of such equivalence classes in D. This set is finite by Fact 2.7.Whether or not a region is totally visible or totally not visible only depends on M H (p, e), as the following crucial lemma establishes.In particular, F has a non-empty face shadow.In particular, the camera position is affinely independent of the vertices of F(e) with which it spans a d-dimensional simplex.The facet-supporting hyperplane of this simplex are, by construction, exactly the transversal and the longitudinal visibility hyperplanes associated to F, which are members of H (p, e).This implies condition (i), and, hence, that conditions (ii) and (iii) are well defined.In this case, since R(p, e) is contained in the face shadow of F, it satisfies all facet defining inequalities of it.This implies conditions (ii) and (iii), which are a reformulation of the same fact in terms of cocircuit/covector signatures.Assume now that all three conditions are satisfied.In particular, (ii) and (iii) are well defined.By these conditions, R(p, e) satisfies all facet defining inequalities of the face shadow of F. Thus, it is contained in that face shadow.The assertion about the total shadow follows from its definition as the finite union of face shadows.Regions inside the total shadow are called invisible from p, not invisible regions are called visible from p.
Step 5 Recall that the set M H is finite (Fact 2.7).Recall further that the set M H is the set of all equivalence classes of elements in D, where the members of each equivalence class induce combinatorially equivalent hyperplane arrangements.The following lemma states that all equivalence classes are semi-algebraic sets.Here D is a semi-algebraic set by assumption.The projected set is semi-algebraic by Fact 2.8 and Lemma 4.2.The projection of it to the (p, e)-coordinates is a semialgebraic set by Fact 2.2.The intersection with D is semi-algebraic by Fact 2.2.Therefore, the equivalence class M H ( p, ē) is a semi-algebraic set.Since there are only finitely many oriented matroids on a finite set of hyperplanes (Fact 2.7), there are only finitely many equivalence classes.
Step 6 The plan is now to compute the volumes of the regions not in the total shadow more explicitly.To this end, each region is triangulated.In order to keep control of the dependence on the camera configuration (p, e), the same combinatorial type of triangulation should be kept for as many camera configurations as possible.A sufficient condition for a triangulation to stay feasible for the same point configuration with tweaked coordinates is that the oriented matroid of the point configuration does not change.
Note that the oriented matroid of a hyperplane arrangement does not uniquely determine the oriented matroid of its vertices as a point configuration, not even for each region separately.To by-pass this problem, each equivalence class of the previous step is further subdivided.Denote by C(p, e) the set of vertices of the polyhedral complex of regions of H (p, e)∩P and let K (p, e) be its label set.In order to guarantee a consistent

P
Fig. 9 The intersection points of the hyperplane arrangement are the vertices of the regions labeling, we label each point by the subset of labels of those hyperplanes it lies in, where intersection points outside the room are ignored.Note that intersection points inside and outside the room lie on opposite sides of at least one facet-supporting hyperplane of the room, leading to a different oriented matroid of the hyperplane arrangement.Thus, in each equivalence class M H (p, e) the subset of intersection points inside the room is constant.Figure 9 shows the point configuration of all intersections points inside the room. We

P
Fig. 10 The volumes of the visible regions can be computed by a triangulation of the intersection points refining the polyhedral subdivision by regions; the camera configuration on the right is better than the one on the left seen that all three are semi-algebraic sets (by Fact 2.8 and Lemmas 4.2 and 4.7), and so is their intersection (Fact 2.2).Consequently, by Fact 2.3, each such equivalence class in D and, hence, the semi-algebraic set of feasible camera configurations D itself can be stratified into strata S ∞ -diffeomorphic to open cubes of certain dimensions so that the boundary of each stratum is a finite union of smaller-dimensional strata and so that inside each stratum all camera configurations are equivalent.Moreover, the volumes of the finitely many max-dimensional strata add up to the volume of D, and the not-max-dimensional strata form a set of measure zero.
Step 7 For each M ∼ (p, e) ∈ M ∼ refine the polyhedral complex of regions in R(p, e) that are inside P to a fixed triangulation of C(p, e), e.g., by some generic regular refinement [9,Corollary 2.3.18].Any such triangulation (seen as an abstract simplicial complex on K (p, e), see Notion 2.9) defines via the embedding e and the position p a valid triangulation for all feasible camera configurations equivalent to (p, e), since the validity of a triangulation depends only on the oriented matroid of the point configuration to be triangulated (Fact 2.10).Call this triangulation T (M ∼ (p, e)).
Because T (M ∼ (p, e)) refines R(p, e) inside P, the open geometric embedding of each simplex in T (M ∼ (p, e)) is either completely visible or completely invisible from p, and the visibility does not change inside an equivalence class.Figure 10 shows a possible triangulation for the visible region and the resulting visible volume.
Step 8 Consider some feasible camera configuration ( p, ē) ∈ D. Then the visible volume can be computed for all (p, e) in the equivalence class M ∼ ( p, ē) as follows: (1) This is the sum of positive simplex volumes mentioned in the proof idea.Thus, the visible-volume function restricted to an equivalence class is a sum of determinants of r × r matrices with a row of ones whose columns are given by the homogeneous coordinates of points in C(p, e), thus a multilinear polynomial function of degree at most d in the coordinates of the points in C(p, e).By composition with earlier results, this is a rational function of degree at most d 3 in the camera configuration data.By continuity and boundedness of the visible-volume function everywhere in D, the visible-volume function formula (1) extends to the boundary of each stratum.
(Intuitively, some of the simplex volumes contained in the triangulation corresponding to the interior of the stratum degenerate to zero on some boundary stratum; these simplices are exactly those missing in the triangulation corresponding to the boundary stratum, which leads to the same volume.)Thus, the visible-volume function is a rational function of degree at most d 3 on the closure of each stratum.

Remark 4.8
Although all illustrations are two-dimensional, all constructions are correct in arbitrary spacial dimensions d.Note, though, that in dimension two the result can be achieved in an easier way, exploiting structures of dimension two that cannot be generalized to higher dimensions.
The construction allows for the following generalization: If there is more than one camera to be configured, we can construct the open regions visible and invisible from each camera separately.Each open region in the combined hyperplane arrangement is then a subset of a unique open region in each separate arrangement and, hence, for each camera either completely visible or invisible.We can, therefore, decide the exact subset of cameras from which it is visible completely.Therefore, the result extends to the volume covered by a given collection of subsets of cameras.In particular, this applies to the volume covered by at least/exactly/at most k cameras.Call the function that assigns to each feasible configuration of multiple cameras the volume visible by at least/exactly/at most k cameras the at-least/exactly/at-most-k-fold-visible-volume function, respectively.With this definition, the following corollary holds true.strata.The number of strata is even more discouraging: even if each equivalence class constitutes a single stratum without further decomposition, then a-priori there can be roughly as many strata as there are different oriented matroids on arrangements of K r hyperplanes, where K (r − 1) of them all intersect in a point.For example, in physical space, i.e., in rank 4, there are already 10,559,305 realizable simple acyclic oriented matroids on eight elements (= hyperplanes) [11].Even if all but r = 4 many longitudinal hyperplanes are ignored because of their forced common intersection, this number of strata would be reached already by the at least K = 4 facets of the room without any obstacles.

Conclusions
In this paper, the visible-volume function was shown to be continuous, piecewise rational, locally Lipschitz, and semi-algebraic in all dimensions.The set-up was chosen more general than in earlier work: the visible-volume function may depend on the positions of a set of cameras and the embedding of an environment in a convex room.It returns the volume that the cameras can supervise given the cameras' positions and the embedding of the environment.The environment can be an arbitrary abstract simplicial complex of pure codimension one.The embedding and the camera positions can be restricted to an arbitrary semi-algebraic set.The actual result provides a piecewise smooth formula with a rational function on each piece.Given this knowledge, we can be sure that certain global blackbox optimization methods applied to the visiblevolume function will converge (at least if the restrictions of the embedding and the camera positions are chosen to be tractable).Moreover, from the explicit piecewise formula, gradient information of the visible-volume formula can easily be obtained at each feasible camera configuration.One contribution of this paper is to formalize the problem and construct suitable objects of discrete geometry in such a way that a novel combination of the basic theories of oriented matroids, triangulations, and semi-algebraic sets implies the result.This can be seen as a show-case how those theories play together, which may be interesting in its own right.
At first glance, it seems that the exploitation of the explicit piecewise formula in this paper for optimization is out of reach for sufficiently realistic environments.However, it is conceivable that large-scale methods from mixed integer linear programming, e.g., with dynamically generated selection variables for oriented matroids, might constitute a viable approach to find an exact global extremum of the visible volume function.Whether such methods can be implemented to show a satisfactory performance for practical problems or at least for medium-sized academic benchmark examples is an open question.

Fact 2 . 3 (
stratification theorem for semi-algebraic sets and functions) Every semialgebraic set can be stratified into finitely many strata such that each stratum is S ∞ -homeomorphic to an open cube, and the boundary of each stratum is a finite union of strata of lower dimensions[2, Theorem 5.38 (rephrased)].

Fig. 3 A
Fig. 3 A camera configuration formed by position and aperture blades in the room

Definition 3 . 5 Fig. 4
Fig.4 Two cut-off face shadows: one for a face of the aperture blades and one for a face of the environment; some points in the room are in both shadows (darker)

Definition 3 . 6 (
visible volume) The visible-volume function in room P on the set of feasible camera configurations D is defined as the function V ( • , • ) : D → R ≥0 , (p, e) → vol d (P \ S(p, e)) = vol d (P) − vol d (S(p, e) ∩ P).

2 3 4 PFig. 6 Proof of Lemma 4 . 2
Fig.6 The hyperplane arrangement of a camera configuration; the longitudinal visibility planes are those that meet in the camera position

ForStep 3
the following, fix such equations a i (p, e)x − b i (p, e) = 0 for all hyperplanes H i with i ∈ I and denote the matrix with rows (a i (p, e)|−b i (p, e)) i∈I by W (p, e).An open region R(p, e) of H (p, e) is a connected component of the complement P \ i∈I H i of the arrangement in the room.The closures R(p, e) of the open regions are intersections of closed halfspaces with the polytope P and, therefore, convex polytopes.All open faces of these polytopes are also called regions.Denote

PFig. 7
Fig. 7 Each region of the hyperplane arrangement is either completely visible or completely invisible from the camera position

Lemma 4 . 3
For a fixed feasible camera configuration (p, e) ∈ D, the visible volume can be computed as follows: V (p, e) = R(p,e)∈R(p,e): R(p,e)⊆P\S(p,e) vol d (R(p, e)).

Figure 7 Step 4
Figure 7 on the right shows the visible volume, subdivided into visible regions.Step 4 Associated with H (p, e) is its oriented matroid (see Notion 2.4), determined by its finite set of signed covectors.Recall that this is a set of signatures σ R(p,e) : I → {−, 0, +}.Each signature in this set corresponds to an open region R(p, e) in R(p, e) of H (p, e) so that

Figure 8
Figure 8  illustrates the covectors of two full-dimensional regions.Each covector is indicated as a string of signs.Each position in the string corresponds to a hyperplane.The sign in that position is the signature value of that hyperplane.

Lemma 4 . 4 Proof of Lemma 4 . 4
A region R(p, e) is in the face shadow S F (p, e) of a (d−1)-simplex F ∈ F with respect to a feasible camera configuration (p, e) if and only if the following three conditions hold for σ R(p,e) : (i) The vertices of F(e) and the camera position p are cocircuits of H (p, e).(ii) Let i ∈ I be the label of the transversal visibility plane spanned by F. Then σ R(p,e) (i) = −σ p (i). (iii) Let i ∈ I be the label of any longitudinal visibility plane spanned by p and a (d − 2)-face F ∈ F of F and let v F\F be the geometric vertex of F(p, e) missing in F (p, e).Then σ R(p,e) (i) = σ v F\F (i).Moreover, R(p, e) is in the total shadow S(p, e) if and only if the above conditions are satisfied for at least one (d − 1)-face of F .Assume first that R(p, e) is contained in the face shadow of F.

Corollary 4 . 5
Whether or not a region is in the total shadow does not change inside each M H (p, e).

Lemma 4 . 6
For each ( p, ē) ∈ D, the equivalence class M H ( p, ē) is a semi-algebraic set.Moreover, there are only finitely many equivalence classes in D. Proof of Lemma 4.6 The equivalence class M H ( p, ē) of ( p, ē) in D can be written as follows: M H ( p, ē) = D ∩ proj (p,e) (p, e, W , W ) ∈ R d × (R d ) J × R I ×r × R I ×r : W = W (p, e), W = W ( p, ē), M H (W ) = M H ( W ) .

Lemma 4 . 7
define an equivalence relation "∼ C " on D where (p, e) ∼ C (p , e ) if and only if C(p, e) and C(p , e ) are combinatorially equivalent (Notion 2.5).The equivalence class of (p, e) with respect to "∼ C " is denoted by M C (p, e).The coordinates of the points in C(p, e) are rational functions of degree d in the coordinates of the coefficient vectors and the right-hand sides of the hyperplanes in H (p, e).Consequently, they are rational functions of degree at most d 2 in (p, e).Proof of Lemma 4.7 Each point in C(p, e) is the unique intersection of d hyperplanes in H (p, e).Thus, each coordinate of such a point is, by Cramer's rule, a quotient of d × d determinants in the coefficients and right-hand sides of the hyperplanes.This is a rational function of degree at most d in the data of H (p, e).Moreover, by composing this function with the polynomial function from Lemma 4.2, we obtain a rational function of degree at most d 2 , as claimed.Define an equivalence relation on the set of all feasible camera configurations (p, e) ∈ D as follows: (p, e) and (p , e ) ∈ D are equivalent, (p, e) ∼ (p , e ), if and only if (p, e) ∼ H (p , e ) and, additionally, (p, e) ∼ C (p , e ).The set of all equivalence classes is denoted by M ∼ .Thus, by Fact 2.10, equivalent camera configurations induce identical sets of (combinatorial types of) triangulations of C(p, e) and identical sets of (combinatorial types of) regions.This, finally, is the partitioning of D into equivalence classes mentioned in the proof idea.Each equivalence class M ∼ ( p, ē) ∈ M ∼ of some ( p, ē) ∈ D is the intersection of D with M H ( p, ē) and M C ( p, ē).Analogously to the proof of Lemma 4.6 it can be V(p, e)

Corollary 4 . 9
For all k ∈ N the at-least/exactly/at-most-k-fold-visible-volume functions are continuous, piecewise rational, locally Lipschitz, and semi-algebraic in all dimensions.Remark 4.10 A short note on complexity estimates: If K is the number of facets of the environment complex and the room, then there are K transversal and at least K (r − 1) longitudinal visibility hyperplanes.With this, in general, one must consider roughlyr i=1 K i K (r −1)r −i regions contributing to potentially different summands over all