POINT CLOUD SEGMENTATION AND FILTERING TO VERIFY THE GEOMETRIC GENESIS OF SIMPLE AND COMPOSED VAULTS.

: This research work proposes a methodology to statistically determine the geometric configuration of a masonry cross vault. Within Cultural Heritage it is possible to find architectural elements with absent or scarce historical sources about design approach or construction techniques. The cross vault case study belongs to a partially destroyed vaulted system distributed along the aisles of ancient Assunta’s Cathedral which is part of the Aragonese Castle on Ischia island, near Naples (Italy). Using photogrammetrical data acquisition, standard geometric analysis, numerical processes, computing and statistics this paper shows a method to objectively determine the geometric shape which best fits one of the existing Cathedral vault according to critical interpretation about stylistic and cultural contents linked to specific geographical and temporal contexts. This paper provides explanations, methods and objective calculation algorithms to find the best-fitting shape for a generic given point cloud and it is aimed at demonstrating the complementarity between descriptive geometry and algorithmic mathematical approaches. The final product of this multidisciplinary workflow is a 3D model deriving from the comparison between an ideal automatic model built thanks to the translation of traditional geometric rules in visual scripting language and an automatic model deriving from the mathematical analysis of survey data, curves and surface, of the architectural element. This experimentation generates 3D models to perform in-depth multidisciplinary tests and AR and VR applications to promote the communication of destroyed or inaccessible cultural heritage.


INTRODUCTION
Knowledge, preservation, communication and fruition are the main steps for Cultural Heritage valorisation.These steps require an interrelated analysis of different information thanks to integrated approaches.3D surveys represent one of the main inputs for multidisciplinary analysis.Documentation and conservation of Cultural Heritage is experiencing a strong innovation in linked primarily to the digitisation of information.(Bitelli, 2018) Survey activity is the main tool to reconstruct the basic geometric structure of the design and construction process according to a Scan to HBIM approach.However, objective data of an architectural work will always correspond to a series of subjective information linked to the human interpretation of the element.(Cianciani, 2015) This contribution analyzes the geometric structure of a cross vault belonging to the partially destroyed original side aisle of the ancient Assunta's Cathedral on Ischia island.(Fig. 1 -2) A rigorous survey activity supports the comparison between an ideal geometric model and numerical model of a point cloud.The main goal of this work is to achieve a digital product aimed at conservation, enhancement and dissemination of this cultural heritage through VR and AR applications.The absence of graphic and textual sources, diagnostic activity (thermography, coring works, etc.) and the presence of geometric inconsistencies probably caused by possible resetting interventions or possible structure deformations over the time, requires hypotheses about the constructive rules of this architectural element.Another goal is also to investigate unknown construction techniques.Therefore, numerous cross and longitudinal profiles have been extracted from the point cloud to understand the specific geometry of the selected vault.The goal is the correct interpretation and modeling of the arches and surfaces that compose the vaults system of the original Cathedral's aisle.(Fig. 2) Arches and surfaces have been used in many ways and applied to different composition styles over time in architectural heritage buildings.Sometimes their geometric and constructive layout has been recorded on historical treatises or sketches allowing to know the construction process.However, in other cases there are no documents to objectively determine the geometry of historic buildings, opening a subjective and intuitive debate in order to define a coherent geometric configuration of a specific case study.(Samper et al., 2016) Therefore, the goal of this contribution is to validate the interpretative hypothesis of the Cathedral's semi-destroyed vaulted system through mathematical best fit of the hypothesized surfaces that compose the element reducing as much as possible the operator arbitrariness.However, in some cases, profile and section curves analysis involved in the genesis of a specific kind of vault is not sufficient and to create an accurate digital model it is necessary to know masonry structure, webbings, intrados and extrados single or double curvature or to have information about used materials.These deficiencies complicate the recognition and interpretation of a simple vault or composed vault about its portions and spheroidal or cylindrical lunettes.Structural analysis and conservative approaches require accurate models about the specific curvature of an architectural element.In the field of cultural heritage communication, VR or AR applications need accurate models: sometimes it is necessary to project textures of frescoes and paintings or design artistic installations on curved surfaces.Furthermore, the correct nature of a curved surface facilitates the element genesis and simplifies its 3D modeling according to specific tools and modeling logic about different traditional or visual scripting approaches for procedural modeling (CAD objects) or BIM (OOCAD) aimed at HBIM.Therefore, Scan to HBIM approach is aimed at providing a valid interpretation of the element to create a parallel about the digital and physical construction technique to consciously idealize a model that is as close as possible to the real element.

A CASE STUDY: THE AISLES VAULTS OF ASSUNTA'S CATHEDRAL ON ISCHIA ISLAND
The Aragonese Castle is a fortification located on a trachytic rock island on the eastern side of Ischia.The original structure dates back to 474 a. C. while the current configuration is from Baroque period.The Assunta's Cathedral is one of the most important buildings of the castle and it is a precious presence of the historical cultural heritage of the island.
Recent studies are about the crypt, a single nave covered by cross vaults and completely frescoed by Giotto's unknown painters.(La Padula, 1997) Over the centuries, many artworks belonging to the Cathedral were used to enrich other religious buildings on the island.The cathedral was built in Romanesque style and it was composed of a single nave, covered by cross vaults.This original configuration coincides with one of the two existing side aisles.(Fig. 2, on the right) In the XVIII century the Cathedral was enlarged in Baroque style adding an apse covered by an ovoid dome, a central nave and a second side aisle.(La Padula, 1997).The side aisles are separated from the central nave by two arcades and they were covered by depressed cross vaults.The decorations consisted of white stuccoes and frescoes on the altar made by anonymous Campanian artisans.(Fig. 1) Nowadays, five vaults are still complete, a pair is partially destroyed, and three vaults are completely destroyed, while the barrel vault of the central nave and the dome on the apse have completely collapsed.(Fig. 2) A pair of arches have a different geometric shape than the others and they have not yet been analyzed (Fig. 2, below -on the left).Despite very few iconographic and photographic sources it is interesting to approach a hypothesis about inner and outer configuration of the Cathedral to allow the virtual enjoyment of this cultural heritage.Nowadays, the Cathedral is a location for cultural events and the advancement of geometric hypotheses about the original layout is fundamental to enrich communication tools and design proposal using VR and AR applications: heritage will be physically usable in its new configuration and virtually in its original configuration.Moreover, the protection of baroque stuccos against atmospheric agents constitutes an impellence determined by their rapid deterioration: wind erosion, washout caused by the rains and salt air undermine the supporting wall structure.Therefore, the main goal of this study is to analyze the existing architectural elements to digitally rebuild the spatial geometric configuration.

WORKFLOW: AN INTEGRATE APPROACH
About geometric genesis and construction technique there are not historical sources, descriptive texts, technical drawings about this vaulted system.(Fig. 2)   Therefore, the product of this workflow is an ideal 3D model closest to the real selected vault through a multidisciplinary approach.

GEOMETRIC APPROACH: IDEAL MODELS
Geometry is the main tool to control design process from the idea to the construction.It takes an active role in the simplification of construction procedures.The vault case study is a cross vault on a rectangular plan: over the centuries this type of vault is derived from rigorous traces.The rationality of geometric rules plays an important configurative role.However, its presence is not always traceable only using metric data.It is possible to introduce a latent geometry or geometric structure as matrix and generator of spaces whose organicity is guaranteed by rationality.(Norberg -Shulz, 1966) This kind of vault is already existing in Roman architecture and it is composed of active masonry framework and a neutral conglomerate filling.When ribs are clearly visible, it is easier to identify the parts that compose the vault.(Capone, 2014) However, in several famous cases it is not easy to identify the intrados or extrados curvature.For example, the Sala dei Baroni vault of Castel Nuovo in Naples is a famous case of a composed vault in which the geometric identity of the main and secondary surfaces has recently been clarified.The recent Laser Scanning (Amore, 2018) and Digital Photogrammetric surveys (Panice, 2016) interpret this vault as a hemispherical revolution dome enriched by eight radial lunettes.1(1) Previous historical main reference source (Sgrosso, 1979) proposed some hypothesis: a large vault composed by four or eight semi-cylinders generated by the revolution of a circular or elliptical arc, or a unique spherical surface.Moreover, even the exact curvature of the lunettes is not clear.Furthermore, single or double curvature of the lunettes belonging to numerous types of vault in many historic buildings is not clearly defined.About vaulted systems, graphic tracing and construction techniques are strictly linked and it is possible to refer to the manuals or treatises to recognize the geometric genesis of the surfaces they compose a specific kind of vault.(Capone, 2019) The scarce sources about the case study only report that the depressed cross vaults of the Assunta Cathedral were built during the Romanesque period by local workers.
From a structural point of view, the main elements that characterize Romanesque architectural language are semicircular arch, cross vault, ribbed vault and span.It is possible to distinguish two different matrices for medieval cross vaults: sphere, (ogival cupuliform vaults) and cylinder (cylindrical cross vaults).(Capone, 2014) By changing the parameters (rise, span, curvatures) that define the lateral, diagonals or crown arches it is possible to generate numerous cross vault compositions: the different curvature of the portions depends on the combination of these parameters, hence of geometric nature of involved arches.According to these premises, the portions of a cross vault can be singlecurved surfaces (cylindrical or conical), or double-curved surfaces, (spherical, ellipsoidal or, in other specific cases, paraboloids, hyperboloids or other quadrics).Furthermore, the curvature of masonry elements depends above all on of the masonry webbings.Masonry webbings follow the straight generating lines, a series of curved consecutive sections or it can be a filling distributed on a formwork between reinforcement arches.For example, Roman cross vault (continuous structural element) required the construction of a wooden scaffold to reproduce the intrados of the vault.The construction of ribbed cross vaults (discrete structural system) involves the construction of supporting arches and secondary vaults.In the medieval period, secondary vaults were made using special ribs for arches or consecutive sections to generate double curvature surfaces portions.(Abbate, 2006) About case study the masonry webbing or filling are not visible: therefore, it is not easy to advance hypotheses about the curvature of its parts: this situation is common to many cases of cultural heritage.The strength point of this workflow is to compare visual scripting and mathematical definitions built on the specific parameters involved in the geometric genesis of different types of vault.Therefore, it is necessary to extract above all significant sections for a specific type of vault by comparing the real element and the ideal models: the operator will insert input points or curves in the most suitable vault parametric definition belonging to the visual scripting or math libraries.Moreover, this approach allows the comparison between several output types of vaults and real case studies.Multidisciplinary approach of this research experience allows the development of an implementable library composed of different mathematical programs and visual scripting definitions for different types of arcs and surfaces.

DATA SEGMENTATION: FROM POINT CLOUD TO IDEAL MODEL
The point cloud of Assunta's Cathedral was produced by photogrammetric restitution (Agisoft PhotoScan).Photographic camera used to catch the images was a full frame digital reflex.Point cloud segmentation was performed with 3DF Zephyr Aerial software.The next step consists in performing a point cloud segmentation to extract the vault case study and to subdivide this curved shape into several subsets consistent with a design and constructive hypothesis.
To extract planar geometries (lateral, diagonal, crown and intermedied arches), the point cloud was sectioned by a series of vertical planes perpendicular to the impost plane.Impost plan was placed above the existing mouldings.(Fig. 3) Then, point cloud segments (2d polylines or series of points) were analyzed using AutoCAD (Autodesk), Rhinoceros (McNeel) and according to visual scripting logic using Grasshopper (Rhino plug-in, McNeel).
A first analysis excluded the hypotheses of a simple spheroidal or ellipsoidal vault and confirmed a cross vault on a rectangular plan.
Figure 3. Point cloud segmentation: arches and surfaces hypothesis.
Previous orthophotos analysis shows that the crown arches are curvilinear: therefore, the vault intrados is composed by four double curvature surfaces.(Fig. 3) Over the centuries, about geometric distribution or semantic decomposition of cross vault it is possible to distinguish quadripartite, hexapartite vaults or divided into eight parts on square, rectangular or polygonal plan and pseudo cylindrical (linear crown) and spheroidal (curvilinear crown) vaults.(Capone, 2014) In some cases, the difference between circular, elliptical e and oval arches is minimal and the operator can influence the choice of the curve compromising the final result.(Migliari, 1996).the vault.This approach (work in progress) works on the optimized reconstruction of the 2D polylines to generate regular polyhedra, polylines, splines or NURBS to search best fit curve to the original one.This method determines that lateral and diagonal arches are more similar to ellipses and crown arches to circumferences.Therefore, the main goal consists in automatic recognition and tracking of curves (circle, ellipse and ovals) that best fit a generic original section.Explaining in visual scripting language the implicit algorithms of some specific components of Grasshopper, it is possible to break down the process into a series of replicable operations within different visual scripting software, such as Dynamo (Autodesk).Another possible approach is to work on interoperability between different software (Grasshopper or Dynamo).This solution can adapt the process to different digital environments and modeling logics (CAD, HBIM, BIM).The final comparison between the ideal visual scripting model and the mathematical model allows us to verify the reliability of this process.The next paragraph shows the results elaborated by the mathematical programs realized to identify the types of lateral, diagonal and ridge curves and surfaces that best fit the real geometrical structure of the vault case study.

DATA FILTERING: CURVES AND REGRESSION QUADRICS THAT BEST FIT REAL ARCHES AND SURFACES
To generate a surface model from point cloud data, a segmentation that extracts the edges and partitions the threedimensional point data is necessary and plays an important role in fitting surface patches and applying the scan data to the manufacturing process.(Woo et al. 2002) The previous section shows the arcs and surfaces extracted from the point cloud to analyze best fit between circles and ellipsis.

Architectural arches: best fit
This paragraph shows the evolution of a mathematical method to objectively determine the geometric shape which best fits an arch or a curved surface of a heritage architectural element.This method does not involve mechanical, constructive or structural processes; it only involves standard geometric processes, numerical processes, computing, statistics and 3D data acquisition.(Samper et al. 2016) The following tables shows the results about the arches that best fit the polygonal segments extracted from the point cloud.The curves that best fit the section listed in table 1 are ellipses, while table 2 shows that the curve that best fit one of the intermedied sections is a hyperbola.Also, in the tables we show the circles that best fit the polygonal segments and the corresponding elliptic arcs to compare visual scripting data.Anyway, over the centuries, it is common that arches or surfaces show deformations.Therefore, it is interesting to calculate the surfaces that best fit the four surfaces delimited by these elliptical arcs.The point cloud was divided into four equal parts in pairs: pair A and pair B. The analysis was calculated on a portion A bounded by lateral arch A and semi-diagonal arch and on a portion, B bounded by lateral arch B and semi-diagonal arch.This approach provides explanations, methods and objective calculation algorithms to find the best-fitting of a pairs of double curvature surface.
The following paragraph shows the steps to generate the double pair of surfaces that best fit the vault.

Architectural Surfaces: geometric regression
Let  = {  } =1 = be the point cloud outlining the surface contour of a vault surface segments A (171.537 points) and B (245.824 points).(Fig. 6).These points were obtained using photogrammetrical techniques (Agisoft PhotoScan).The spatial position of this reference ℛ ′ is geometrically unknown at the start of calculations.
We said that the orthonormal reference system ℛ  is mobile depending on ,  and  because ℛ  is the rotation of system ℛ ′ = {;  ⃗ 1 ,  ⃗ 2 ,  ⃗ 3 } when ,  and  change.
A progressive way of generating that rotation is as follows: first (using formula [3] and angular amplitudes , ), we place a unit vector  3 in any position; second (using formula [2] and angular amplitude ), we place unit vector  2 in such a way that it is perpendicular to  3 and lies within linear subspace 〈 ⃗ 1 ,  ⃗ 2 〉; third (using formula [1]), by means of cross product we generate vector  1 such that the basis { 1 ,  2 ,  3 } is orthonormal and direct; fourth (using formulas [4-5] and angular amplitude ), we rotate vectors { 1 ,  2 } around vector  3 =  3 (formula [6]), thus obtaining the rotated vectors { 1 ,  2 } such that the basis { 1 ,  2 ,  3 } is orthonormal and direct.Therefore, after defining parameters ,  and , we have the coordinates (  ,   ,   )  in the reference system ℛ  for each of the points   in the cloud  = {  } =1 = .Next we calculate Γ  , which is the surface of the regression ellipsoid which fits to cloud , and we obtain the following equation Eq. ( 7) in the reference system ℛ  : 2 +    2 +    2 +    +    +    + 1 =0 (7) The regression surface, Γ  , described by Eq. ( 7) previous in the reference system ℛ  , is the one which best fits the point cloud  = {  } =1 = , minimizing the sum of the quadratic or: being in this case: >0 and     >0 Eqs. ( 9) below are the Gauss normal equations which provide the solution to the calculation problem of Γ  .These equations have a range of variation 1-n in Einstein summation convention, being 1  = 1.For example, , and 1    3 = ∑   3 = =1 Remark: Formula ( 7) is the reason why we rotate the system ℛ ′ when ,  and  change, thus obtaining the system ℛ  .
Nonetheless, what matters here is not the equation for Γ  , but the ellipsoid Γ  itself.Therefore, instead of finding Γ  in the system ℛ ′ , we do as follows: First, we find the ellipsoid Γ  which fits cloud  such that the equation of this ellipsoid in the system ℛ  takes the form (7); and then, we vary the angle distances ,  and  until we find the ellipsoid Γ  which best fits the cloud .

Statistical fit measurement
Next, we will calculate to what extent that surface statistically explains the cloud .For these calculations, we will use correlation ratio  2 , see Eq. [9]: where  ̅ = is given by Eq. [11]: where  1 = 5, number of regression surface parameters.
We know that   2 ∈ [0,1] in all cases, and the value   2 * 100 =   is the proportion in which the variable (  )  of cloud  is statistically explained by the least-squares correlation between (  )  and (  ,   )  .In other words, this value   indicates the percentage of the variable (  )  of cloud  which is statistically explained by the corresponding regression surface Γ  .Namely,   is a statistical measurement of how well the regression ellipsoid Γ  fits .Using a calculation software that we created with C++, we repeat all the above calculations for each triplet (, , ) ∈ [0, ) × [0, ) × [0, ).The three amplitudes vary in a discrete manner with successive increments of 0.005 radians.Therefore, we repeat the calculation 625 3 = 244140625 times.Each triplet (, , ) corresponds to one of the 625 3 references ℛ  , which are the and which corresponds to this maximum .This is the ellipsoid which statistically best fits the cloud .(Fig. 7)

Best fit
The statistical concepts used in this paper, such as the correlation ratio in [11] and the adjusted coefficient in [12], can be found in several books, for instance, in the well-known references (Rao, 1973-Berenson, 2002).
The numerical concepts of the Gauss normal equations can be found, for instance, in the famous reference (William, 1992).
The classification and analysis of quadratic surfaces can be found in many modern books, such as (Hernández, 1994), and in old books, such as the classic reference (Wilson, 1925).

Results from data set: other double curvature surfaces
We have provided a mathematical process to objectively determine which surface between Hyperbolic paraboloid, Elliptic paraboloid, Hyperbolic hyperboloid and the Ellipsoid which best fits this point cloud  = {  } =1 = (surface A and surface B), and we have also provided a statistical measurement δ of that fit (Table 3).The statistical measurement of the Ellipsoid does allow to affirm that the architect could have used a constructive method based on such geometry.

THE CATHEDRAL 3D MODEL: VR/AR EXPERIENCES
Using photogrammetrical data acquisition, standard geometric processes, numerical processes, computing and statistics this contribute shows a generic method to objectively determine which are the geometric shapes which best fit arches and surfaces involved in the geometric genesis of an architectural element.According to semantic decomposition, data filtering confirmed that the vault case study is composed of four ellipsoidal portions, with elliptical diagonal, lateral and crown arches.Thus, the portions are elliptical ellipsoid portions.Therefore, all the aisles vaults have been modeled to show a reconstructive hypothesis of the Cathedral inner space.(Fig. 8) Figure 9 shows the destroyed and reconstructed parts (in red).
Figure 10 shows a partial reconstructive hypothesis of the Cathedral to experiment immersive spherical panoramic and AR applications: the output consists in an interactive system for different users aimed at enhancing cultural heritage.

CONCLUSIONS
The main product of this multidisciplinary approach consists of upgradable library to verify different types of arches and quadrics starting from point cloud segments: it is a database moving from semantic decomposition to systematization of built heritage.About this research experience it has been important to consider that the choose of surfaces varies according to the styles and identity of the cultural heritage in relation to geographical locations and historical periods.Anyway, this banal aspect stimulates research implement these math and visual scripting libraries adding new types of surfaces.A future goal is to complete the translation of the process in visual scripting language to generate a user-friendly automatic system to build curves that best fit irregular and discontinuous polylines extracted from point cloud.A correct intrados or extrados model is suitable for analysis of structural behaviour, deformations, geometric study and development of frescoes (Piemonte et al., 2018) This approach upgrades researches about different modeling logics aimed at different goals optimizing CAD and OOCAD modeling for Scan to HBIM processes.In conclusion, this approach aims to merge implicit mathematical approach and user-friendly visual scripting approach to accelerate and simplify the recognition and modeling of architectural elements.
Figure 10.A partial reconstructive hypothesis of the Assunta's Cathedral for VR application.

Figure 2 .
Figure 2. Identification of the vault case study belonging to the Cathedral original aisle (on the right).
the diagonal curve is elliptical, there are different hypotheses based on the nature of all the arcs involved: the quadripartite vault composed by the pairs of portions A and B could derive from the translation of the four lateral arcs along the two arches of the curvilinear crown arch.Moreover, if intrados is composed of a pair of ellipsoids of revolution, the lateral sections can be circles or ellipses: it depends on the position of the ellipsoids.The overlap between geometric ideal and point cloud models suggested a first valuable hypothesis: a quadripartite vault composed by four double curvature and ellipsoidal symmetrical pairs of surfaces, probably generated by the translation of elliptical arches along a pair of circular crowns.2D polylines extracted from the point cloud are imported in Grasshopper (Rhino plugin, McNeel) and they are optimized in continuous curves using a generative algorithmic definition scripting to reconstruct a 3D wireframe of

Figure 4 .
Figure 4. Visual scripting best fit arches: circles or ellipsis

Figure 7 .
Figure 7. Ellipsoid regression of surfaces A and B.

Table 2 .
Curves that best fit intermedied sections The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLII-2/W15, 2019 27th CIPA International Symposium "Documenting the past for a better future", 1-5 September 2019, Ávila, Spain rotations of the initial reference ℛ ′ .For each rotation we obtain the surface Γ  , which has its own statistical fit measurement   .We calculate the maximum value of the 625 3 fit measurements   .This maximum value is obtained for certain values   ,   and   , and we call it  =        .Having determined this maximum value , we obtain the ellipsoid which in reference system ℛ       :{;  1      ,  2      ,  3      } = {;  1 ,  2 ,  3 } is described by the equation:   2 +    2 +    2 +    +    +    + 1 = 0 (13)