## 2 Materials and Methods
### Procedural Generation of the City and Visualization  
The full 3D description of the city was generated using procedural modelling, a process that utilizes a formal grammar with parameterized production rules to generate detailed 3D objects from simple geometric features [50; 51]. The process begins by extruding the initial shape to create a 3D model that is subsequently divided into shapes, such as facades and roofs. To create a high-level model, the shapes are further decomposed into several elements such as windows and doors, and textures or colours can be added to these elements. In this project, the CityEngine (CE) software was used for procedural modelling. This program utilizes a computer-generated architecture (CGA) shape grammar that can be further detailed by incorporating external 3D models. Since its initial implementation, CityEngine has been widely used for the procedural modelling of historical cities [52].  
Due to the large area of interest covering approximately 15 km\({}^{2}\) and containing around 1300 procedurally generated houses and 16 singular 3D buildings, the houses in the model were kept simple with minimal geometric detail. This was necessary to manage the high volume of data. To compensate for the lack of geometric detail, high-quality textures were applied to the models.  
An example of a CGA rule for the house creation process is provided, which includes parametric attributes for the procedural 3D reconstruction of a house as defined in Table 4. The @enum tag indicates the possible values for the attribute. Then, in the Set_Shape rule, from a general plot shape and depending on several conditions, one of the rules for houses with I form (Ishape), L form (Lshape), L with attached construction form (LC shape), U form (UShape), and O form (Oshape) is fired. Finally, below we can see the rule for IShape that states that a plot for an Ishape house should be subdivided into a base front for the house with depth profC and the remainder of the plot. Then, to generate the base front, the IShapeC rule should be fired, and to generate the back, the remI rule should be fired.  
@enum(0,1,restricted=true)  attr isCorner=0  @enum(0,1,restricted=true)  attr isRectangu=false  @enum(\"I\",\"L\",\"U\",\"O\",restricted=true)  attr formCa=\"I\"  enum(0,1,restricted=true)  attr attachedC=0  attr profC=7.6  
Set_Shape-->  case (isRectangu=false|isCorner==1):  IShape  else:  case formaC==\"I\":  case attachedC==1:  LCShape  else:  IShape  case formaC==\"L\":  LShape  case formaC==\"U\":  UShape  else:  OShape  
IShape -->  setback(profC) { street.front = IShapeC | remainder = remI }  
In our case, CGA rules generate the 3D model of the house according to the parameters defined in Table 4. The result of the application of the CGA rules for random samples of the five types of houses defined in Section 2.2.3 is shown in Figure 21.  
The process of generating more than a thousand houses and placing them on city blocks was carried out using procedural modelling. The 3D terrain model surrounding the city was imported, followed by the insertion and placement of singular buildings and other elements of the city. The CE software enabled the integrated generation and manipulation of all 3D elements. However, the rendering abilities of CE are not as advanced as those of specialized rendering software. Therefore, the final scene was exported to Blender to generate all the rendered results.