## 2 Modeling and Implementation
### Mathematical Modeling  
In the first step, we wish to generate a surface from a given point cloud \(\mathcal{P}\in\mathbb{R}^{n\times 3}\) containing elements \(\mathbf{p}_{i}\in\mathcal{P},i\in\mathbf{I}\), with \(\mathbf{I}\subset\mathbb{N}\) being the associated index set. An element \(\mathbf{p}_{i}\) further consists of its specific components and is defined as \(\mathbf{p}_{i}=[x_{i},y_{i},z_{i}]\). From the definition of the scalar field described in Section 1, it follows that each pair of values \([x_{i},y_{i}]\) is assigned exactly one real number \(z_{i}\). This means that we are able to remove the \(z_{i}\) component first and project the remaining component pairs \([x_{i},y_{i}]\) onto the \(xy\)-plane, which is qualitatively illustrated in Figure 1. From this procedure, we obtain a subset \(\mathcal{P}^{\prime}\in\mathbb{R}^{n\times 2}\) containing the two-dimensional points denoted by \(\mathbf{p}^{\prime}_{i}=[x_{i},y_{i}],i\in\mathbf{I}\). These can then be utilized to perform Delaunay triangulation to produce triangles that do not intersect. Moreover, the indices of points that form a triangle are known, and this information will be of importance in the further course of the work. Note that Delaunay triangulation is a common method for generating meshes in finite element analysis ([16], p. 394). A detailed description of the method can be found in ([17], p. 199). The vertices of the triangles are then reassigned to the corresponding \(z_{i}\) components, and we obtain the surface approximated using triangulation. This approach offers the advantage that the basic structure of the triangles is preserved, and we additionally obtain a set \(\mathbf{K}\in\mathbb{R}^{m\times 3}\) containing all triangles \(k\) defined by the indices of the points. In the second step, the intersection points of the surface with an arbitrarily oriented plane are to be calculated. For this purpose, we first consider a random triangle \(k\in\mathbf{K}\) of the approximated surface. The idea now is to use vertices \(\mathbf{v}^{k}_{j},j\in\{1,2,3\}\) of the triangle for generating vectors \(\mathbf{f}^{k}_{j},j\in\{1,2,3\}\), which are examined to determine whether they intersect the plane. With \(\lambda\in[0,1]\), these are to be computed as follows:  
\[\mathbf{t}_{1}^{k} =\mathbf{v}_{1}^{k}+\lambda(\mathbf{v}_{2}^{k}-\mathbf{v}_{1}^{k}) =\mathbf{v}_{1}^{k}+\lambda\mathbf{q}_{1}^{k}\] \[\mathbf{t}_{2}^{k} =\mathbf{v}_{2}^{k}+\lambda(\mathbf{v}_{3}^{k}-\mathbf{v}_{2}^{k}) =\mathbf{v}_{2}^{k}+\lambda\mathbf{q}_{2}^{k}\] \[\mathbf{t}_{3}^{k} =\mathbf{v}_{3}^{k}+\lambda(\mathbf{v}_{1}^{k}-\mathbf{v}_{3}^{k}) =\mathbf{v}_{3}^{k}+\lambda\mathbf{q}_{3}^{k}.\]  
Consider the plane given in its coordinate form  
\[P:\quad ax+by+cz=d. \tag{1}\]  
On this basis, intersection point \(\mathbf{s}_{j}^{k}\) of a vector \(\mathbf{t}_{j}^{k}\) with this plane is to be determined first. For this purpose, its components are inserted into the plane equation defined by Equation (1) and solving for \(\lambda\) yields  
\[\lambda=\frac{d-(a\,v_{j,x}^{k}+b\,v_{j,y}^{k}+c\,v_{j,z}^{k})}{a\,q_{j,x}^{k} +b\,q_{j,y}^{k}+c\,q_{j,z}^{k}}. \tag{2}\]  
Then, the \(\lambda\) given by Equation (2) is inserted back into the equation for \(\mathbf{t}_{j}^{k}\) to compute intersection point \(\mathbf{s}_{j}^{k}\), and it is subsequently to be verified whether the latter is an element of the interval defined by the respective vector. Therefore, we set the system of equations  
\[\mathbf{s}_{j}^{k}=\mathbf{t}_{j}^{k}(\lambda^{*}) \tag{3}\]  
and solve it for the new \(\lambda^{*}\). In case \(\mathbf{s}_{j}^{k}\) is an element of the specific interval and is thus a relevant intersection point, \(\lambda^{*}\) must be in turn an element of the interval \([0,1]\). From this follows the sufficient condition  
\[\lambda^{*}\in[0,1]\rightarrow\mathbf{s}_{j}^{k}\in\mathbf{t}_{j}^{k}(\lambda ^{*}). \tag{4}\]  
It is easy to see that the number of possible intersection points depends on the number of triangles and thus on the resolution of the approximated surface.