# Residential Buildings Complex Boundaries Generation Based on Spatial Grid System
## 1 Introduction  
Designing a floor plan is one of the common tasks performed by architects. For thousands of years, this process was manually conducted and supported by different methods that consider the environment around the building, room types and sizes, room connections, as well as climate, culture, and other influencing rules. In recent years there is a great need for automation of this process considering the digitalization of this industry. This trend applies not just in the field of architecture, but also in the media and video game industries where flexible rule-based rapid model generation is essential. Rapid generation of city environments consists of repetitive tasks which can be achieved more efficiently using procedural modeling techniques. These techniques are based on automatic or semi-automatic systems for procedural modeling such as shape grammar, cellular automata, L-systems, fractals, etc. These systems are often highly specialized for segmented design procedures using a narrow framework for a specific task. The general specification of any system includes functional and non-functional requirements, where the latter addresses the constraints under which the former have to beapplied. The implementation of non-functional requirements is generally more demanding. The majority of scientific boundary generators are focused on the functional usage of the interior spaces usually resulting in simple building boundaries. The form of the building acts as a container for the interior space but it is not solely defined or influenced by it. Functionality is not a key component in the digital and video game industry where residential building simulations mainly create a recognizable style. The contemporary design in real-world architecture directly influenced the research approach presented in this article. In the presented approach, the focus is on the restrictions implied by external non-functional influencers, like contemporary building design, wind comfort, building-lot design, or even aesthetic factors and so on, as the driving force for shaping the designed residential building. This was the main reason why the adopted approach ignores the interior functionality in order to enable the rapid generation of building boundary variations that are compliant with the external restrictions, to which the interior functionality impact, as the other side of the same coin, may be added afterward (on demand). This paper is focused on residential-type buildings which usually have more complex borders than other types such as office buildings, factories, supermarkets, schools, etc. In the verification phase of our methodology, we have used real examples of complex building boundaries. The prototyped solution to the problem of automatic residential building border design by observing its floor plans as a grid system has been achieved by using a simple rule-based algorithm that accepts the area of the building as an input and generates complex shapes that represent different versions of residential floor plan border. The developed algorithm generates floor plans by observing buildings in the form of a two-dimensional array (grid) with respect to lot area and fixed building boundary size, through successive transformation steps leading to the completely connected cells model (see Figure 1). The algorithm validity is checked via the application of prototyped software on a selected set of real residential building examples. The derived results have been used for algorithm adjustments and code refactoring that were used in order to raise the level of abstraction and enable the development of a software framework conceptual model that may  
Figure 1: The illustration of an algorithm for one particular transformation starting with a 5 by 5 array (matrix), transformed to a 10 by 10 and finally a 20 by 20 array resulting in boundary rendered in 2D and also illustrated in 3D visual form. be used in further method, algorithm, and software tool refinements. The rest of the paper is organized as follows.