Keywords

1 Introduction

In this paper we introduce digital primitives defined by a weighted focal set. Continuous geometric objects defined by foci have been well studied but nothing, to our knowledge, has been proposed so far in digital geometry.

The word focus is the Latin word for fireplace. This comes from classical experiment which consists in converging the sunlight, in the focal point of a lens, on a piece of paper to ignite it. Focal points play a fundamental role in the geometry of lenses and study of lenses played an important role in the early development of mathematical physics. The historic importance of the research in optics can even be traced in our common language with expressions such as “staying focused”.

Classically a foci based continuous geometric object is defined as all the points such that the sum of the distances to the foci is a constant. The distances may have different weights in an even more general definition [9]. In this paper we introduce foci defined digital geometric primitives. The definition we propose covers digital objects with multiple foci, in arbitrary dimension. Our definition includes weighted distances with positive weights. Contrary to the continuous definition, in the definition that we propose, the weighted sum of the distances to the foci is not a constant but lies in an interval. This definition generalizes the Andres digital hyperspheres [1, 2] that has only one focal point. We show that with a well defined interval, we can prove some important topological properties for our digital objects such as \((n-1)\)-separation and \((n-2)\)-connectivity properties. With an appropriate sequence of such intervals, it is easy to see that we can provide a space partition by such foci based digital primitives.

In a second part of the paper, we propose two extensions. Firstly, we propose an immediate extension of the definition that allows to define m-separating digital foci based primitives. As a second extension, we propose a new type of digital conics whose definition is based on a focal point and a directrix. Again, it is possible to show that we have topological separation properties. This illustrates that the exploration on the possibilities provided by this new approach offers many opportunities for further research.

After this introduction and basic notions and notations, we introduce in Sect. 2.1, our definition of foci based digital objects and propose several fundamental properties of such objects. In Sect. 3, we propose two types of extensions: foci and directrix defined digital objects with properties, and boundary foci based digital objects with properties. We conclude and discuss perspectives in Sect. 4.

Basic Notions and Notations

Let \(\{{e_1},\ldots ,{e_n}\}\) denote the canonical basis of the n-dimensional Euclidean vector space. Let \(\mathbb {Z}^n\) be the subset of \(\mathbb {R}^n\) that consists of all the integer points. A digital (resp. Euclidean) point is an element of \(\mathbb {Z}^n\) (resp. \(\mathbb {R}^n\)). We denote by \(x_i\) the i-th coordinate of a point or a vector x, that is its coordinate associated to \({e_i}\). We denote by \(c_i\) the i-th element of a list or sequence C. A digital (resp. Euclidean) object is a set of digital (resp. Euclidean) points. When not otherwise stated, the distance we are considering in this paper is the Euclidean distance \(d(\cdot )\) with \(d(p,q)=\sqrt{\sum _{i=1}^{n}(p_i-q_i)^2}\) for \({p},{q} \in \mathbb {R}^n\).

For all \(k\in \{0,\dots ,n-1\}\), two integer points p and q are said to be k-adjacent or k-neighbors, if for all \(i\in \{1,\dots ,n\}\), \(|p_i-q_i|\le 1\) and \(\sum _{j=1}^{n}\left| p_j-q_j\right| \le n-k\). In the 2-dimensional plane, the 0- and 1-neighborhood notations correspond respectively to the classical 8- and 4-neighborhood notations. In the 3-dimensional space, the 0-, 1- and 2-neighborhood notations correspond respectively to the classical 26-, 18- and 6-neighborhood notations [8].

A k-path is a sequence of integer points such that every two consecutive points in the sequence are k-adjacent. A digital object \(\mathrm {C}\) is k-connected if there exists a k-path in \(\mathrm {C}\) between any two points of \(\mathrm {C}\). Let us suppose that the complement of a digital object \(\mathrm {E}\), \(\mathbb {Z}^n{\setminus }\mathrm {E}\) admits a set of k-connected components \(\mathrm {C}\), or in other words that there exists no k-path joining integer points of any two connected components of the set \(\mathrm {C}\) then \(\mathrm {E}\) is said to be k-separating, or k-tunnel free, in \(\mathbb {Z}^{n}\). If there is no path from any two connected components of the set \(\mathrm {C}\) then \(\mathrm {E}\) is said to be 0-separating or simply separating.

2 Foci Based Digital Primitives

2.1 Definition

The classical continuous primitives that are defined by a set of focal points can be summarized by the following definition.

Definition 1

A foci based continuous nD primitive is defined as all the continuous points:

$$ \left\{ x \in \mathbb {R}^n: \sum _{i=1}^{k} \alpha _i d\left( x,f_i\right) = r \right\} $$

where f is the list of foci \(f=\left( f_1, \ldots , f_k\right) \) with \(f_i \in \mathbb {R}^n\), \(\alpha _i \in \mathbb {R}^{*+}\) the weight of the distance to focus \(f_i\), and \(r \in \mathbb {R}\) the generalized radius.

This definition covers hyperspheres (with one only focus traditionally called the center of the hypersphere), ellipsoids and k-ellipsoids (with respectively two and k foci, and all weights equal to unity), Cartesian ovals and k-Cartesian ovals (with respectively two and k focal points and arbitrary non-zero weights).

We are now going to introduce a digital version of this definition with some restrictions. Firstly, let us note that a digital primitive is generally not defined mathematically by an implicit equation \(\left\{ p \in \mathbb {Z}^n: g(p)=0\right\} \) because there is usually no particular reason for an integer point to lie on the continuous curve \(g(x)=0\). Instead, J.-P. Reveillés [3, 7] proposed to define a digital line as the digital points in a band defined by a thickness interval \(\left\{ p \in \mathbb {Z}^2: 0 \le a p_1 + b p_2 +c < \omega \right\} \). This captures the general idea that digital primitives are based on grid points where neighborhoods are defined by points that are at a certain, non-zero, distance from each other. To define topologically sound objects, this distance between neighboring points has to be part of the digital definition. This idea of defining primitives as points with an interval has been extended by E. Andres to circles and hyperspheres [1, 2] with definitions based on annulus in 2D, concentric hyperspheres in nD. We now propose a new extension for foci based primitives.

Definition 2

A foci based digital nD primitive \(\mathcal {F}_{k}^{n}(f,\alpha ,r)\) is defined as all the integer points verifying

$$ \mathcal {F}_{k}^{n}(f,\alpha ,r)=\left\{ p \in \mathbb {Z}^n: \left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r-\frac{1}{2}\right) \le \sum _{i=1}^{k}{\alpha _i d\left( p,f_i\right) } < \left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r+\frac{1}{2}\right) \right\} $$

where, f is the list of foci \(f=\left( f_1, \ldots , f_k\right) \) with \(f_i \in \mathbb {R}^n\), \(\alpha _i \in \mathbb {R^{*+}}\) the weight of the distance to focus \(f_i\), and \(r \in \mathbb {R}\) the generalized radius.

Let us note that Definition 2 is slightly less general than Definition 1, since we are considering only strictly positive weights for the digital primitives. This restriction comes from the fact that we are seeking digital primitives with some specific topological properties (see Sect. 2.2) that do not stand with this definition if some weights are taken negative. Let us note that if the general radius is too small then the digital object might be empty. For instance, if \(\sum _{i=1}^k\left( r+\frac{1}{2}\right) <\min _{i=1}^k{\left( \sum _{j=1}^k d\left( f_i,f_j\right) \right) }\), then the digital primitive will be empty.

The Andres digital hypersphere [1, 2] of center c and radius r has been defined as the set H(cr):

$$H(c,r)=\left\{ p \in \mathbb {Z}^n: \left( r-\frac{1}{2}\right) ^2 \le \sum _{i=1}^n \left( p_i-c_i\right) ^2 < \left( r+\frac{1}{2}\right) ^2\right\} $$

It is easy to see that \(H(c,r)=\mathcal {F}_{1}^{n}\left( \left( c\right) ,(1),r\right) \) (see Fig. 1). A Andres digital hypersphere is a foci based digital primitive with one focal point, classically called the center of the hypersphere.

Fig. 1.
figure 1

Andres circle \(\mathcal {F}_{1}^{2}\left( \left( (0.1,0.2)\right) ,(1),3.5\right) \) and Andres sphere \(\mathcal {F}_{1}^{3}(((0.1,0.2,0.3)),(1),3.5)\)

Definition 2 defines a new type of 2D digital ellipse, the foci based digital ellipse \(\mathcal {F}_{2}^{2}((f_1,f_2),(1,1),r)\) with two focal points and equal weights of 1 (or any strictly positive equal weights) and a new type of foci based digital ellipsoid \(\mathcal {E}_{2}^{n}((f_1,f_2),(1,1),r)\) (see Fig. 2). Contrary to some classical or more recent digital ellipse definitions [4,5,6], the digital ellipses are not limited to axis aligned ellipses. Another major property of this definition is that it is dimension independent.

Fig. 2.
figure 2

Foci based digital ellipse \(\mathcal {F}_{2}^{2}\left( \left( (0.1,0.2),(5.1,3.1)\right) ,(1,1),4.5\right) \) and ellipsoid \(\mathcal {F}_{2}^{3}\left( \left( (0.1,0.2,0.3),(5.1,3.1,1.1)\right) ,(1,1),4.5\right) \)

With Definition 2, we propose the first definition of a digital k-ellipse and k-ellipsoid: \(\mathcal {F}_{k}^{n}\left( \left( f_1,\ldots ,f_k\right) ,(1,\ldots ,1),r\right) \) (see Fig. 3). And lastly, it allows to define foci based digital Cartesian ovals with weighted distances \(\mathcal {F}_k^{2}(F,\alpha ,r)\) (See Fig. 4). As we can see, this simple definition allows to define a wide range of new types of digital objects.

Fig. 3.
figure 3

3-ellipse \(\mathcal {F}_3^{2}\left( \left( (0.1,0.3),(2.1,2.3),(-2.1,4.3)\right) ,(1,1,1),3.5\right) \) and 3-ellipsoid \(\mathcal {F}_3^{3}\left( \left( (0.1,0.3,0.5),(2.1,2.3,-2.5),(-2.1,4.3,-5.5)\right) ,(1,1,1),5.5\right) \)

Fig. 4.
figure 4

Cartesian oval \(\mathcal {F}_3^{2}\left( \left( (0.1,0.3),(2.1,2.3),(-2.1,4.3)\right) ,(2,0.5,0.5),3.5\right) \) and \(\mathcal {F}_3^{3}\left( \left( (0.1,0.3,0.5),(2.1,2.3,-2.5),(-2.1,4.3,-5.5)\right) ,(2,0.5,0.5),5.5\right) \)

2.2 Properties

Let us have a look now at the properties of such digital objects. As we will see in what follows, the foci based digital primitives have interesting structural properties:

Theorem 1

A foci based digital nD primitive \(\mathcal {F}_{k}^{n}(f,\alpha ,r)\) is \((n-1)\)-separating in \(\mathbb {Z}^n\).

Let us, for the sake of simplicity of language, call the Euclidean region(s) defined by \(\sum _{i=1}^{k}{\alpha _i} d\left( x,f_i\right) < \left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r-\frac{1}{2}\right) \) the interior of the digital object and the region(s) defined by \(\sum _{i=1}^{k}{\alpha _i d\left( x,f_i\right) }\ge \left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r+\frac{1}{2}\right) \) the outside. Let us note that nothing in Definition 2 requires the inside or outside regions to be composed of a singular connected component. A good example is given by hyperbolic type curves that divide space into three regions and not two.

Proof

Let us consider two digital points a and b and \(E=\mathcal {F}_{k}^{n}(f,\alpha ,r)\) a foci based digital nD object such that a is inside E and b outside E: \(\sum _{i=1}^{k}{\alpha _i} d\left( a,f_i\right) < \left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r-\frac{1}{2}\right) \) and \(\sum _{i=1}^{k}{\alpha _i d\left( b,f_i\right) }\ge \left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r+\frac{1}{2}\right) \).

Here we suppose that the inside of E contains at least one digital point.

Since \(\sum _{i=1}^{k}{\alpha _i d\left( a,f_i\right) }< \left( \sum _{i=1}^k{\alpha _i}\right) \left( r-\frac{1}{2}\right) \), we have \(-\sum _{i=1}^{k}{\alpha _i d\left( a,f_i\right) } \ge -\left( \sum _{i=1}^k{\alpha _i}\right) \left( r-\frac{1}{2}\right) +\epsilon \) with \(\epsilon \) a strictly positive real value.

This means that \(\sum _{i=1}^{k}{\alpha _i\left( d\left( b,f_i\right) -d\left( a,f_i\right) \right) } > \left( \sum _{i=1}^{k}{\alpha _i}\right) \).

Since d is a distance, it verifies the triangular inequality \(d\left( f_i,a\right) +d(a,b) \ge d\left( f_i,b\right) \). With \(\alpha _i>0\), this means that \(\alpha _i d(a,b) \ge \alpha _i\left( d\left( f_i,b\right) -d\left( f_i,a\right) \right) \).

Therefore \(\left( \sum _{i=1}^{k}{\alpha _i}\right) d(a,b) \ge \sum _{i=1}^k\left( \alpha _i\left( d\left( f_i,b\right) -d\left( f_i,a\right) \right) \right) > \left( \sum _{i=1}^{k}{\alpha _i}\right) \), and thus \(d(a,b)>1\). Now, it is easy to see that if there exist a \((n-1)\) path linking a to b without intersecting the object then there has to be a point on the path inside that is \((n-1)\)-neighbor to a point outside. The distance between two such points is at least 1 which proves that E is \((n-1)\)-separating in \(\mathbb {Z}^n\).   \(\square \)

Let us note some important points here. Nowhere in this proof (or more generally in the definition) appears the type of distance. So far in the images we have considered the Euclidean distance but that any distance. It is the triangular inequality property of the distance that is used in the proof.

The next proposition concerns partitioning properties similar to those already seen for the Andres circles and hyperspheres [1, 2]. For the sake of simplicity, we are going to consider, in what follows, foci based digital primitives with consecutive integer general radii. In all generality, it can be any set of consecutive sequence of radii as long as the difference between two consecutive radii is one.

Proposition 1

A set of foci based digital nD objects with consecutive general radii is partitioning space:

For \(r_1,r_2 \in \mathbb {Z}, r_1 \ne r_2\), we have \(\mathcal {F}_{k}^{n}(f,\alpha ,r_1) \cap \mathcal {F}_{k}^{n}(f,\alpha ,r_2) = \varnothing \),

and for \(r\in \mathbb {N}\), \(\uplus _{r=-\infty }^{\infty }{\mathcal {F}_{k}^{n}(f,\alpha ,r)}= \mathbb {Z}^n\).

Proof

The property is a direct consequence from the definition: the intervals \(\left[ r_1-\frac{1}{2},r_1+\frac{1}{2}\right. \left[ \right. \) and \(\left[ r_2-\frac{1}{2},r_2+\frac{1}{2}\right. \left[ \right. \) are disjoint for \(r_1,r_2 \in \mathbb {Z}\), \(r_1 \ne r_2\). And the intervals of consecutive integer general radii r partition the natural number set \(\uplus _{r=-\infty }^{\infty }\left[ r-\frac{1}{2},r+\frac{1}{2}\right. \left[ \right. = \mathbb {Z}\).    \(\square \)

This property is a direct extension of the space partitioning property already seen for the Andres hyperspheres [2]. It is interesting here to note that this property comes directly in contradiction with another property that is often sought which is minimal thickness. It is easy to see that it is not possible to partition space with, for example digital ellipses, without having local non-uniform thickness. Even for the most regular of all those type of figure, circles, this is not possible. Another point to be made about the local thickness of this digital curves and surfaces comes from the proof of Theorem 1. In the proof, the radius disappears when we consider the distance between a point inside and outside the digital object. What that means is that the proposed bounds \(\left( \sum _{i=1}^{k}{\alpha _i}\right) \left( r\pm \frac{1}{2}\right) \) are the bounds that ensure that all the curves and surfaces that partition space (independently of r) are \((n-1)\)-separating. From a general perspective, this can be understood quite easily. For a very large generalized radius r, all the focus points become basically one focus point and the shape of the focus based primitives becomes a hypersphere. It is not very difficult to see that the minimal thickness to ensure the \((n-1)\)-separation property is \(r+\frac{1}{2}-(r-\frac{1}{2})=1\) (one can always divide the formula of Definition 2 by \(\sum _{i=1}^{k}{\alpha _i}\)).

Fig. 5.
figure 5

Partitioning ellipses and partitioning ellipsoids.

Figure 5 illustrates the partitioning property of foci based digital primitives. Note that in the 2D case presented in the figure with focal points (0.1, 0.3) and (5.1, 3.3), the ellipses of radii 0, 1 and 2 are of course empty since the distance between both foci is around 5.83 and with two foci and weights of 1, the definition is given by \(2r-1 \le d(p,f_1) + d(p,f_2) < 2r+1\).

3 Extensions

Let us know look at some extensions of proposed Definition 2 of digital foci based primitives. The first extension is an immediate extension of the definition to more general thicknesses which allows more general separation properties. The second extension corresponds to the classical approach where a digital conic is defined by a focal point and a directrix.

3.1 m-Separating Digital Foci Based Primitives

At first, let us expand Definition 2 to include foci based nD primitives that are m-separating, for \(0 \le m < n-1\) rather than only \((n-1)\).-separating (Fig. 6).

Fig. 6.
figure 6

Foci based digital 0-separating ellipse \(\mathcal {F}_{2}^{2,0}\left( \left( (0.1,0.2),(5.1,3.1)\right) ,(1,1),4.5\right) \)

Definition 3

The m-separating foci based digital nD primitive is defined by: \( \mathcal {F}_k^{n,m}(f,\alpha ,r)=\)

$$\left\{ p \in \mathbb {Z}^n: \left( \sum _{i=1}^{k}{\left| \alpha _i\right| }\right) \left( r-\frac{\sqrt{n-m}}{2}\right) \le \sum _{i=1}^{k}{\alpha _i d\left( p,f_i\right) } < \left( \sum _{i=1}^{k}{\left| \alpha _i\right| }\right) \left( r+\frac{\sqrt{n-m}}{2}\right) \right\} $$

Proposition 2

The digital primitive \(\mathcal {F}_k^{n,m}(f,\alpha ,r)\) is m-separating in \(\mathbb {Z}^n\).

Proof

The proof for the separation property is similar to the one of Proposition 1 with simply a different constant. It results in \(d(a,b)>\sqrt{n-m}\) which proves that the digital object is m-separating.    \(\square \)

3.2 Primitives with One Focal Point and a Directrix

There are many different ways of defining 2D conics. One way is to define a conic with a focal point, a directrix (a straight line) and a constant e called the eccentricity. We are going to propose now a digital definition of conics based on such parameters:

Definition 4

A digital conic \(\mathcal {C}(f,L,e)\) in 2D is given by

$$\begin{aligned} \mathcal {C}(f,L,e) = \left\{ p \in \mathbb {Z}^2: -\frac{e+1}{2} \le d(p,f) - e\cdot d(p,L)< \frac{e+1}{2}\right\} \end{aligned}$$
(1)

where \(f\in \mathbb {R}^2, L\subset \mathbb {R}^2, e>0\) denote the respective focal point, directrix, and eccentricity of the corresponding real conic.

Theorem 2

A digital conic \(\mathcal {C}(f,L,e)\) given by Eq. 1 is 1-separating in \(\mathbb {Z}^2\).

figure a

Proof. Let a and b be two integer points, the former lying in the interior and the latter in the exterior of \(\mathcal {C}(f,L,e)\), as shown in the inset figure. Then,

$$\begin{aligned} d(a,f) - e\cdot d(a,L) < - \frac{e+1}{2}\nonumber \\ \implies -d(a,f) + e\cdot d(a,L) > \frac{e+1}{2}\end{aligned}$$
(2)
$$\begin{aligned} \text{ and } d(b,f) - e\cdot d(b,L) \ge \frac{e+1}{2}. \end{aligned}$$
(3)

Adding Eqs. 2 and 3, we get

$$\begin{aligned} d(b,f) - d(a,f) + e(d(a,L) - d(b,L)) > e+1. \end{aligned}$$
(4)

We have two possible cases:

  1. (i)

    \(d(b,f) - d(a,f) > 1\). by triangle inequality, \(d(a,b) > 1\).

  2. (ii)

    \(d(b,f) - d(a,f)\le 1\). By Eq. 4, \(e(d(a,L) - d(b,L)) > e\), or, \(d(a,L) - d(b,L) > 1\), which implies by Pythagorean theorem, \(d(a,b) > 1\).

As \(d(a,b) > 1\) for either case, \(\mathcal {C}(f,L,e)\) is 1-separating.

Fig. 7.
figure 7

Conics \(\mathcal {C}((-2,2),L,e)\), for directrix L passing through \((-5,-5)\) and (5, 2) and eccentricity \(e = 0.5, 0.7, 1.0, 2.0\) from left to right.

4 Conclusion and Perspectives

In this paper we are proposing a new class of digital primitives with definitions based on focal points. The definition allows any number of foci and weighted distances. The proposed definition generalizes Andres hyperspheres [1, 2]. These primitives are defined in dimension n, have a space partitioning property, and their thickness can be controlled so that they are guaranteed to be m-separating in space. We propose an extension based on a similar principle, where we define a new class of digital conics defined by a directrix (a straight line), a focal point, and a parameter e called eccentricity. What we would like to highlight with this way of defining digital primitives is that it allows power and flexibility to the design of digital primitives.

This work has opened many possibilities for future work and further extensions. Instead of focal points, one can imagine considering distances to objects which could make an interesting link with distance transforms and skeletonization. Can we keep topological m-separation properties? As we can see in Fig. 7 for instance, the foci based primitives do not, in general, have a constant thickness. One could imagine primitives that are defined as the outer or the inner k-connected boundary of the foci based primitives as we have defined them. As mentioned, the proposed formula ensures that, for a set of foci and weights, the digital primitives separate space regardless of the generalized radius. Now, what would we have to change in order to ensure separation for a primitive of a given generalized radius? It would be interesting to compare such primitives to more classically defined digital primitives. For that matter, do the classically defined ellipses, parabola, hyperbola, etc. respect distance sum properties to some focal point?

Fig. 8.
figure 8

Foci based digital primitives on arbitrary digital surfaces

Fig. 9.
figure 9

A digital ellipse based on the Chebychev distance

In the proof of Theorem 1, the only thing that appears is a notion of distance and the minimal distance to ensure a separation property. As one can see in Fig. 8, one can define such focus based digital objects on arbitrary digital surfaces. It would be interesting to extend such notions to graphs and triangular meshes (as long as the triangles in the mesh are somewhat regular). Nothing in the definition limits us to the Euclidean distance. Experimentation with different distances could be very interesting as well (See Fig. 9 as an example).

It is interesting to notice that nothing in Definition 4 or in the proof of Theorem 2 limits our definition to dimension two. As one can see in Fig. 10, with a 3D plane as directrix for instance, that one can create digital ellipsoids, paraboloids, and hyperboloids. One can imagine replacing the plane in 3D by a 3D straight line.

Fig. 10.
figure 10

Conics \(\mathcal {C}((0,0,5),L,e)\), for directrix plane L of equation \(ax+by+cz+d=0\) with \((a,b,c,d)=(18.02,-33.10,92.62,0)\) and eccentricity \(e = 0.5, 0.7, 1, 1.4\) from left to right.

Lastly, general questions can be raised: how can such primitives be recognized? At what more precise conditions are such primitives empty?