## 5 Applying Volume to the Fractal Structures
### The Geometric Computational Method
Figure 5: Example of three constructed cylinders; blue, red, and yellow dots represent three highlighted generators (first three generators of each cylinder); green, cyan, and magenta dots represent the rest of the three cylinders’ points; black empty dots represent the cylinders first and last circles; black filled points represent the initial (\(P_{i}\)) and final (\(P_{f}\)) points. **st1.3**. Three vectors are defined (using Equation (15)): \(V_{1}\) normal to the plane that contains the final circle face of the first cylinder (centered at \(P_{f1}\)); \(V_{2}\) normal to the plane that contains the first circle face (base) of the second cylinder (centered at \(P_{22}\)); \(V_{3}\) normal to the plane that contains the first circle face (base) of the third cylinder (centered at \(P_{i3}\)). Three bisector vectors are defined using Equation (16). **st1.4**. Three cutoff planes (i.e., the planes that trim the cylinders such that the intersecting volumes are discarded) \(\Delta_{1}\), \(\Delta_{2}\), \(\Delta_{3}\) are defined, with the normal vectors being the bisector vectors within Equation (16), and all three planes pass through \(P_{f1}\):  
\[\Delta_{1}:Ax+By+Cz+d=0 \tag{19a}\] \[A=X_{N1},B=Y_{N1},C=Z_{N1},d=-(AX_{pf1}+BY_{pf1}+CZ_{pf1})\] (19b) \[\Delta_{2}:Ax+By+Cz+d=0\] (19c) \[A=X_{N2},B=Y_{N2},C=Z_{N2},d=-(AX_{pf1}+BY_{pf1}+CZ_{pf1})\]  
**st1.5**. To trim CYL\({}_{1}\) with the \(\Delta_{1}\) and \(\Delta_{2}\) planes, the points \(p_{1}ij\) of the generators \(g_{1i}\) form the set \(G_{1}\) substituted in the \(x\), \(y\), \(z\) parameters of Equations (19a) and (19b) and must respect the inequalities \(\Delta_{1}<0\), \(\Delta_{2}<0\). To trim CYL\({}_{2}\) with \(\Delta_{1}\) and \(\Delta_{3}\) planes, the points \(p_{2}ij\) of the generators \(g_{2i}\) form the set \(G_{3}\) (after substitution in Equations (19a) and (19b)) and must respect the inequalities \(\Delta_{1}>0\), \(\Delta_{3}>0\). Finally, to trim CYL\({}_{3}\) with \(\Delta_{2}\) and \(\Delta_{3}\) planes, the points \(p_{3}ij\) of the generators \(g_{3i}\) form the set \(G_{3}\) (after substitution in Equations (19b) and (19c)) and must respect the inequalities \(\Delta_{2}>0\), \(\Delta_{3}>0\). **st1.6**. The last points (for all of the generators for all of the cylinders) that respect the inequalities defined in the previous step are projected in the cutoff planes to define the edge curves (denoted \(\gamma\)) of the cylinders' intersection. The following sequential algorithm is used (presented in general form):  
\[ \begin{split}\#0\text{ Input point }P[x,y,z]\\ \#1\text{ Comute }\varepsilon_{0}=A\cdot x+B\cdot y+C\cdot z+d,\,N[A,B,C] \\ \#2\text{ Compute }P[x,y,z]=P[x,y,z]-N\cdot\varepsilon_{0}\\ \#3\text{ Repeat }\#1\text{ and }\#2\text{ until norm}( \varepsilon_{0})<\varepsilon\end{split}  \tag{20}\]  
Each generator will produce a point for the intersection edge \(\gamma\). In this work, the value for the admitted error was \(\varepsilon=10^{-6}\). The edges of the corresponding cylinders are copied in the trimmed cylinders' data points. Figure 6 shows the computed union of three cylinders (defined previously and illustrated in Figure 5). **st1.7**. An alpha shape is computed (in Matlab, the function is alphaShape [20]) for each of the three trimmed cylinders (with the added edges), and the boundary facets [21] are selected; this yields surface meshes with 3D points and their corresponding triangulation. For the union of the three cylinders, the 3D points of the three trimmed cylinders are concatenated. The triangulations are also concatenated after the necessary change in the indexing of the triangle vertices, e.g., if the first cylinder has 101 points, each triangle vertex of the second cylinder must add 101 and so on (to avoid overlapping triangulations). Moreover, the triangles containing only vertices from the intersection edge \(\gamma\) are discarded (to ensure correct surface stitching). Figure 7 shows the union of three cylinders (previously illustrated in Figure 5).