Applied Sciences: Residential Buildings Complex Boundaries Generation Based On Spatial Grid System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

applied

sciences
Article
Residential Buildings Complex Boundaries Generation Based
on Spatial Grid System
Marko Lazić 1 , Ana Perišić 1, * and Branko Perišić 2

1 Faculty of Technical Sciences, University of Novi Sad, 21000 Novi Sad, Serbia; lazic.m@uns.ac.rs
2 Center Novi Sad, Singidunum University, 11000 Belgrade, Serbia; bperisic@singidunum.ac.rs
* Correspondence: anaperisic@uns.ac.rs

Abstract: The automatic generation of building boundaries in contemporary research and engineering
projects and practices is dominantly characterized by interior functional constraints. As a basis for
the automated generation of various building boundaries, the solution presented in this paper is a
novel approach that ignores the internal (functional) and focuses only on the external (non-functional)
impacts. The primary orientation on external impacts may be, at any instance, extended by suitable
complementary traditional methodology. The applied research methodology and presented method
rely on a developed extendible rule-based system that simplifies floor plan creation by the recursive
application of a formulated spatial grid generation algorithm. Based on starting parameter values
(mainly the lot and building area spaces) the algorithm tends to create a set of grids that satisfy initial
constraints by marking the individual grid cells as a part of the building or empty. The presented
conceptual framework model served as a foundation for creating a prototype software application
that supports the experimental generation of grid arrays that are transformed into readable images of
residential building boundaries. For the initial validation of the developed methodology, method,
and algorithm, the concrete parametric resolution is set to 1 m. The comparative analysis has shown
that the presented approach overcomes some of the limitations of previous related research that

 generate building boundaries in simple rectangular form or with limited variability. The proposed
Citation: Lazić, M.; Perišić, A.; method, in its current stage, outperforms discussed existing methods concerning complex shape
Perišić, B. Residential Buildings boundary building plan generation. Besides that, there is a broad space for further enhancement
Complex Boundaries Generation directions concerning the interoperability with other, independently developed, frameworks, and
Based on Spatial Grid System. Appl. software tools.
Sci. 2022, 12, 165. https://doi.org/
10.3390/app12010165 Keywords: computer graphics image generation; floor plan; rule-based algorithm; complex shape
Academic Editor: Jürgen Reichardt
boundary of buildings

Received: 7 November 2021


Accepted: 20 December 2021
Published: 24 December 2021
1. Introduction
Publisher’s Note: MDPI stays neutral Designing a floor plan is one of the common tasks performed by architects. For
with regard to jurisdictional claims in thousands of years, this process was manually conducted and supported by different
published maps and institutional affil- methods that consider the environment around the building, room types and sizes, room
iations. 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.
Copyright: © 2021 by the authors.
Rapid generation of city environments consists of repetitive tasks which can be
Licensee MDPI, Basel, Switzerland.
This article is an open access article
achieved more efficiently using procedural modeling techniques. These techniques are
distributed under the terms and
based on automatic or semi-automatic systems for procedural modeling such as shape
conditions of the Creative Commons grammar, cellular automata, L-systems, fractals, etc. These systems are often highly special-
Attribution (CC BY) license (https:// ized for segmented design procedures using a narrow framework for a specific task.
creativecommons.org/licenses/by/ The general specification of any system includes functional and non-functional re-
4.0/). quirements, where the latter addresses the constraints under which the former have to be

Appl. Sci. 2022, 12, 165. https://doi.org/10.3390/app12010165 https://www.mdpi.com/journal/applsci


Appl. Sci. 2022, 12, x FOR PEER REVIEW 2

Appl. Sci. 2022, 12, 165


The general specification of any system includes functional and2non-function of 20
quirements, where the latter addresses the constraints under which the former have
applied. The implementation of non-functional requirements is generally more dem
ing. The majority of scientific boundary generators are focused on the functional usa
applied. The implementation of non-functional requirements is generally more demanding.
the interior spaces usually resulting in simple building boundaries. The form of the b
The majority of scientific boundary generators are focused on the functional usage of the
ing acts as a container for the interior space but it is not solely defined or influenced
interior spaces usually resulting in simple building boundaries. The form of the building
Functionality is not a key component in the digital and video game industry w
acts as a container for the interior space but it is not solely defined or influenced by it.
residential building simulations mainly create a recognizable style. The contemporar
Functionality is not a key component in the digital and video game industry where
sign in real-world architecture directly influenced the research approach presented i
residential building simulations mainly create a recognizable style. The contemporary
article.
design in real-world architecture directly influenced the research approach presented in
In the presented approach, the focus is on the restrictions implied by external
this article.
functional influencers, like contemporary building design, wind comfort, building-lo
In the presented approach, the focus is on the restrictions implied by external non-
sign, or even aesthetic factors and so on, as the driving force for shaping the desi
functional influencers, like contemporary building design, wind comfort, building-lot
design, or evenresidential
aesthetic building.
factors andThisso was
on, asthethe
main reason
driving why
force forthe adopted
shaping theapproach
designedignores th
terior functionality in order to enable the rapid generation
residential building. This was the main reason why the adopted approach ignores the inte- of building boundary v
rior functionality in order to enable the rapid generation of building boundary variations function
tions that are compliant with the external restrictions, to which the interior
impact,
that are compliant with asthe
theexternal
other side of the same
restrictions, coin, may
to which be added
the interior afterward (on
functionality demand).
impact,
This paper is focused on residential-type
as the other side of the same coin, may be added afterward (on demand). buildings which usually have more
plex borders than other types such as office buildings,
This paper is focused on residential-type buildings which usually have more complex factories, supermarkets, sch
etc. In the verification phase of our methodology, we have
borders than other types such as office buildings, factories, supermarkets, schools, etc. used real examples of com
building
In the verification phaseboundaries.
of our methodology, we have used real examples of complex
building boundaries. The prototyped solution to the problem of automatic residential building borde
sign by solution
The prototyped observingtoits thefloor plans of
problem as automatic
a grid system has been
residential achieved
building by using a si
border
rule-based
design by observing algorithm
its floor that
plans as accepts
a grid the area
system of theachieved
has been building byas using
an input and generates
a simple
plex shapes
rule-based algorithm that represent
that accepts the area ofdifferent versions
the building as anofinput
residential floor plan
and generates border. The d
complex
oped algorithm generates floor plans by observing buildings
shapes that represent different versions of residential floor plan border. The developed in the form of a two-di
sional array
algorithm generates (grid) by
floor plans with respect to
observing lot area and
buildings in thefixed
formbuilding boundary size, through
of a two-dimensional
cessive
array (grid) with transformation
respect to lot area and steps leading
fixed to the
building completely
boundary size,connected cells model (see F
through successive
transformation 1).steps leading to the completely connected cells model (see Figure 1).

Figure 1. The illustration


Figure 1. of
Theanillustration
algorithm for
of one particular transformation
an algorithm for one particularstarting with a 5 by 5starting
transformation array with a
(matrix), transformed to a 10 bytransformed
array (matrix), 10 and finally
to aa 10
20 by
by 10
20 and
array resulting
finally a 20 in
byboundary renderedininboundary
20 array resulting 2D ren
and also illustrated
in 2Dinand
3D visual form.
also illustrated in 3D visual form.

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 ab-
straction and enable the development of a software framework conceptual model that may
Appl. Sci. 2022, 12, 165 3 of 20

be used in further method, algorithm, and software tool refinements. The rest of the paper
is organized as follows. Section 2 presents a brief survey of different approaches related to
the research topic. In Section 3, a brief overview of methods and goals is presented together
with the conceptual model of extendible software framework intended to serve as an
umbrella for future improvements of methodology implementation refinements. Section 4
contains a detailed description of the algorithm and several representative examples that
illustrate the way the algorithm is developed and refined. In Section 5 the cross-reference
analysis of the proposed method and algorithm performance compared to related work
references are presented. Section 6 addresses the discussion, and the possible directions of
future research are presented in Section 7. The list of referenced literature is presented in
the finishing part of the article.

2. Related Work
In the current literature, there are a number of proposed systems suitable for automatic
building generation based on different geometry concepts. The layout of rectangular floor
plans was introduced by Shekhawat [1]. Kozminski et al. [2] presented an algorithm for
architectural floor plan generation using rectangular planar graphs. Bhasker et al. [3]
proposed a similar approach using triangular planar graphs. This system was further
developed by Wang et al. [4], who introduced an approach to generate floor plans from room
adjacencies obtained from existing plans. All of these methods only generate rectangular
rooms based on predefined (existing) graph structures.
Martin [5] has developed an algorithm to generate residential floor plans using the
Monte Carlo method for room distribution. Flemming et al. [6] have applied an expert
system for solving building layouts, introducing many serious disadvantages. As a conse-
quence of the fact that the completeness and consistency of the system are not known to the
user, it takes an intolerably lot of time to converge resulting in bad response time. Addition-
ally, real building boundaries usually vary in shape and these variations are ignored in both
Martin’s [5] and Flemming et al.’s [6] approach. The boundaries are rectangular because
they are derived from the internal constraints where all of the rooms have s rectangular
shape, (which is not very common in contemporary architectural practice).
Del Rio-Cidoncha et al. [7] based the research approach on an expert system where
optimization is performed through the use of artificial intelligence. Nauata et al. [8]
developed a method for house layout generation using relational generative adversarial
networks. The presented solution satisfies the majority of addressed problem aspects but
generated building boundaries are dominantly simple, due to the fact that rectangular
forms are derived from rectangular rooms in most discussed cases. For the generation
of building layouts within a known boundary, Peng et al. [9] used a linear programming
system of deformable tile templates. The exterior building boundary is the input while the
interior layout is divided into tiles that are labeled as rooms. This is one of the research
works that use the building boundary as an input that drives function within the object
that, in a broader sense, shares a similar idea as the approach presented in this paper.
Wu et al. [10] proposed a solution that automatically generates layout designs based on a
MIQP (mixed integer quadratic programming) formulation.
Nonlinear programming techniques have been used for floor layout problems by
Li et al. [11]. However, the solutions are derived for rectangular shape buildings only.
Harada et al. [12] developed a model for interactive manipulation of layouts by the use of
shape grammar. The results are within the simple form of building boundary and constant
interactive input from a user is required. Wang et al. [13] proposed a framework for the
automatic generation of floor plans using graph grammar formalism. The system can
reproduce good results, but for each deviation from a rectangular building, interactive user
input is required. Duarte [14] presented an interactive system for layout generation based
on discursive grammar incorporating programming grammar and designing grammar.
The described solutions include the 3D aspect and layout of the design space, but, due
to the recognizable architectural style that has been analyzed, only produce rectangular
Appl. Sci. 2022, 12, 165 4 of 20

forms. Some of the researchers found the solution for house layout automation through
the use of genetic algorithms [15–17]. Wu et al. [18] proposed a data-driven method for
generating floor plans for residential buildings. They utilized a dataset of floor plans of real
buildings in order to construct a neural network for layout generation. This research shows
that, with extensive layout database and adequate neural network training, the problem of
automatically generation of building layouts can be solved using existing boundaries as
an input.
Merrel et al. [19] used a Bayesian network trained on real-world data to design an ar-
chitectural program that generates floor plans using stochastic optimization. The described
solution enables the generation of simple and complex building forms, but with low levels
of complexity. The basic approach, described in this paper, is focused on the creation of
very complex forms instead. That is why the former related work reference is used for the
comparative analysis of derived results, presented in detail in Section 5.
Hua [20] proposed a method for automatic construction of irregular floor plans from
the graphical patterns as an input where the accuracy of the input area of the rooms in
the described results is not of great importance. The boundary is derived from the input
image of an object shape. Al Omani [21] used natural graphic images to generate a building
layout plan. Bao et al. [22] developed a method for exploring different building layouts
based on simulated annealing.
Procedurally generating building shapes with grid-based constraints based on the
cellular automata approach is widely adopted in the field of architectural and urban design
based on the cellular automata approach. Patterns generated by cellular automata systems
are used in architectural design for form exploration [23–26]. Several methods have been
developed based on cellular automata systems. Anzalone and Clarke [27] developed a
system for the generation of 3D buildings based on Conway’s Game of Life system [28].
Araghi and Stouffs [29] use cellular automata for the generation of high-density residential
buildings, addressing density, accessibility, and natural light. Some researchers explored
cellular automata generation results as the first step and developed architecture form
enveloping some cells or the entire form [30,31].
However, the application of cellular automata systems in the domain of architectural
design is faced with several limitations. According to [26,32,33], the degree of complexity
for even simple architectural outcomes suggests that generating a complete architectural
design in this manner is resource-demanding and, in general, probably even not possible.
The main challenge is to find the solution that preserves an acceptable balance between
complexity in architectural design and formal rules of cellular automata systems.
Summarizing the current state-of-the-art analysis it is possible to conclude that there
are several approaches used as a foundation to specification, modeling, and design of tools
for automated generation of building boundaries, with emphasis on 2D or 3D building
geometry layout inclusion.
The comparative analysis of related work relevant to this article topics, with respect
to selected key factors (dimensionality, interior layout inclusion, and boundary type) is
presented in Table 1.
The analyzed results, however, show that the prevalent trend mainly focuses on the
simple boundary type forms because either complex forms appeared challenging for the
particular approach or they were not considered at all.
Appl. Sci. 2022, 12, 165 5 of 20

Table 1. The comparative analysis of related work relevant to this article.

Research Method/Problem That Is Addressed Dimensionality Interior Layout Boundary


Type
Shekhawat [1] Spiral based layout generation 2D Yes Rectangular
Algorithm for finding a rectangular
Kozminski et al. [2] 2D Yes Rectangular
dual of a planar triangulated graph
Algorithm to construct a rectangular
Bhasker et al. [3] dual of an 2D Yes Rectangular
n-vertex planar triangulated graph
Algorithm for floor plan generation
Wang et al. [4] from existing floor plans based on 2D Yes Rectangular
graph transformations
Algorithm for procedural house
Only as a
generation based on the Monte Carlo Complex, derived from
Martin [5] 2D predefined
method (one example without the code rectangular rooms
rectangular shape
or detailed method description)
Only as a
Expert system for solving building Complex, derived from
Flemming et al. [6] 2D predefined
layouts based on design grammars rectangular rooms
rectangular shape
Expert system based on route search as
Del Rio-Cidoncha et al. [7] 2D Yes Rectangular
a problem of AI optimization
Relational generative adversarial
Simple, derived from
Nauata et al. [8] neural network for graph-constrained 2D Yes
mostly rectangular rooms
house generation
Layout computation using
Peng et al. [9] 2D Yes Boundary is an input
deformable templates
Algorithm based on mixed-integer Simple, but also Boundary
Wu et al. [10] 2D Yes
quadratic programming formulation can be an input
Nonlinear programming techniques
Li et al. [11] 2D Yes Rectangular
for floor layout generation
Mixed continuous/discrete models Simple, derived from
Harada et al. [12] where user can manipulate objects 2D Yes
within constrains mostly rectangular rooms

Simple with required


Algorithm that uses reserved graph
Wang et al. [13] 2D Yes input for each deviation
grammar formalism
from rectangle form
Discursive grammar that consists of
Rectangular, because of
Duarte [14] programming and a 3D Yes
the architectural style
designing grammar
Data-driven method for generating
Wu et al. [18] floor plans where building boundary is 2D Yes Boundary is an input
an input
Bayesian network trained on Mostly simple, with
Merrel et al. [19] 3D Yes
real-world data limited complexity
Irregular architectural layout synthesis Yes, with errors in
Hua [20], AlOmani [21] 2D Irregular, from pattern
with graphical inputs the output area
Bao et al. [22]
Complex adaptive systems applied to
Anzalone and Clarke [27] 3D No Mostly simple
architecture form

Cellular automata-based algorithm for Complex, but with


Araghi and Stouffs [29] 3D No low resolution
3D building generation (10 × 10 m cells)

3. Overview
From the methodology point of view, the starting point of the research, presented in
this paper, was to derive the foundations of an extendible rule-based framework model that
may be used to derive either formal procedures or a family of software tools addressing
the problem of building boundary generation.
There are two main framework features that have to be explicitly addressed, extendibil-
ity and persistency.
Extendibility is the most important characteristic of any formal procedure or software
system. It means that new concepts may be introduced at any instance of time without
Appl. Sci. 2022, 12, 165 6 of 20

impact on any previously added (existing) concepts. It is especially important in software


engineering where it is known as an Open/Close quality design principle [34]. In our
case, it is essential to support the extendibility of applied strategy (Inner-Bounded, Outer-
Bounded, or even the combination of them), method (the collections of rules), and algorithm
(rule-based limited set of steps needed to reach an arbitrary problem solution).
Appl. Sci. 2022, 12, x FOR PEER REVIEW 7
The initial conceptual framework model, in the form of an object-oriented diagram, is
presented in Figure 2.

<<call>> StrategyInterface
StrategyManager
0..* + findAlgorihhm () : int

InnerBoundStrategy OuterBoundStrategy

AlgorithmManager
0..1 0..1
<<call>>
0..1 + applyAlgorithm () : int
Framework
{abstract}
AlgorithmInterface
- FrameworkID : int RulesManager
- FrameworkName : int
0..1
0..1
+ buildRulles () : int + execute () : int
+ buildAlgorithms () : int + buildCollection () : int
+ buildConfiguration () : int
+ buildStrategy () : int 0..1
+ loadModel () : int
+ saveModel () : int ConcreteAlgorithm1 ConcreteAlgorithm_k
0..*

+ executeA1 () : int + executeAk () : int


RulesCollection
{abstract}

<<bind>>

RulesStructure
0..*
ConcreteRulesCollection_1

0..1
<<bind>>

CompositeRule
ConcreteRulesCollection k

ElementaryRule
{abstract}

ElementaryRule1 ElementaryRule2 ElementaryRule_n

Figure2. 2.
Figure TheThe initial
initial framework
framework conceptual
conceptual model. model.

The Framework is a concept to which the interoperability concerns are allocated. It


The method used in the proposed solution receives the area of a building as an i
delegates the extendible point handling to StrategyManager, AlgorithmManager, and Rules-
in the form
Manager of two-dimensional
components gridpoints:
with the extending representation (particularly
Strategy Interface, Algorithm1 × 1Interface,
m cells) and v
available
and algorithms
ElementaryRule in respectively
fabric order to, if(see
possible, generate corresponding building bound
Figure 2).
thatThe
satisfy initial constraints (lot and building size) preserving
explicit dependency between each ConcreteAlgorithm the grid cells
and corresponding Con-intercon
creteRulesCollection
tion principle. This hasapproach
to be maintained in order
is chosen to enablesimplify
to initially the analysis
theofoverall
algorithm-rules
shape thereby
correlation (see Figure 2).
erating particular solutions that:
• can be, for verification purposes, easily compared with other methods
• are suitable for further enhancements and development in the domain of build
layout design.
Boundary shape can be either rudimentary with a small number of variation
Appl. Sci. 2022, 12, x FOR PEER REVIEW 8 of 2

Appl. Sci. 2022, 12, 165 7 of 20


The resolution of 1 m of the final image was chosen because in related work research
smaller cells of the system caused the generation of buildings that are too complex com
pared to real buildings and larger cells composed results that are simple and similar t
The other essential point of framework specification is the way of preserving concrete
related work
products findings.
(generated set of building boundaries) joined with a particular instance of Strategy,
This paper method combination
Algorithm, and Parameter is applied todata.
building boundary generation for a 20 × 20 m lot siz
because typical
The initial residential
conceptual buildings
framework are infrom
model thisthe
category. Expanding
persistency aspect isthe boundaries
presented in of th
Figure 3 in the form of an object-oriented diagram.
lot did not improve the algorithm in the experimental phase of this research.

Parameter
FrameworkInstanceModel 0..1
- parameter : String
0..1 - initialParameterSet : Parameter 0..*
- usedAlgorithms : ObjectSet
0..1

Framework
{abstract}
GetModel
- FrameworkID : int
- FrameworkName : int
+ buildRulles () : int 0..1 + getModel () : FrameworkInstanceModel
+ buildAlgorithms () : int
+ buildConfiguration () : int
+ buildStrategy () : int
+ loadModel () : int 0..1
SetModel
+ saveModel () : int

+ setModel () : FrameworkInstanceModel
0..* <<call>>

FrameworkInstanceView
<<call>> <<call>>

+ getInstanceModel () : FrameworkInstanceModel

Persistency
NotifyView

+ loadInstance () : int <<call>>


+ saveInstance () : int + notify () : int

FrameworkInstanceController

0..* + executeAlgorithm () : void


+ seteInstanceModel () : void
PersistenLayer_1 PersistentLayer_L + notifyInstanceView () : int

Figure3.3.The
Figure The initial
initial framework
framework conceptual
conceptual model—persistency
model—persistency aspect. aspect.

The
Therole of the Framework
rule-based system is concept
chosen is because
the same.it allows the writing of algorithms that ar
The Persistency interface concept enables the extendibility of vide variety of persistent
reasonably fast for a rapid generation. They are also adjustable to better suit the needs fo
forms and structure handlers used to store a large volume of data usually created in the
the task of creating images that represent building boundaries. Through an extensive tria
particular processing. It isolates the persistent layer from its dynamic management.
andThe
error process, delegates
Framework the rulesthe
forinternal
the proposed method
data structure are formulated
concerns and described in th
to the FrameworkInstance-
algorithm section of this paper.
Model concept. It is loaded and saved through the Persistency interface methods implementation.
TheFramework
The method described in this
delegates the paper is derived
visualizations concernsinofainternal
way that datait structure
can be compared
to the with
the real buildings of complex
FrameworkInstanceView concept andboundary shapetransformation
data structure to confirm that there
actions is a need
concerns for such
to the
FrameworkInstanceControler
generator. Next, the method concept.
is compared with different results of other methods de
scribed in the related work sectionand
The role of GetModel, SetModel, andNotifyView interfaces
the discussion is toofrelax
section this dependences
article.
of FrameworkInstanceModel, FrameworkInstanceView, and FrameworkInstanceCon-
troler concepts.
4. Algorithm
The method used in the proposed solution receives the area of a building as an input
in the The
formgeneral algorithm used
of two-dimensional to illustrate and
grid representation refine the1proposed
(particularly × 1 m cells) method is presented
and varies
in Figurealgorithms
available 4. in order to, if possible, generate corresponding building boundaries
that satisfy initial constraints (lot and building size) preserving the grid cells interconnection
principle. This approach is chosen to initially simplify the overall shape thereby generating
particular solutions that:
• can be, for verification purposes, easily compared with other methods
Appl. Sci. 2022, 12, 165 8 of 20

• are suitable for further enhancements and development in the domain of building’s
layout design.
Boundary shape can be either rudimentary with a small number of variations, or
quite complex just as is the case in the real examples examination. The primary focus
of the proposed method is the focus on complex building boundaries. As the boundary
complexity directly influences algorithm complexity and the time for analytical calculation,
the method is exercised through the application of different spatial grid transformation
algorithms, described in the algorithm section of the article. These variations had a direct
impact on criteria that restricts the number of lines composing the particular floor plan.
This calculated number is used as a metric for comparative analysis and the evaluation of
the proposed method with regards to other published solutions.
The resolution of 1 m of the final image was chosen because in related work research
smaller cells of the system caused the generation of buildings that are too complex compared
to real buildings and larger cells composed results that are simple and similar to related
work findings.
This paper method is applied to building boundary generation for a 20 × 20 m lot size
because typical residential buildings are in this category. Expanding the boundaries of the
lot did not improve the algorithm in the experimental phase of this research.
The rule-based system is chosen because it allows the writing of algorithms that are
reasonably fast for a rapid generation. They are also adjustable to better suit the needs for
the task of creating images that represent building boundaries. Through an extensive trial
and error process, the rules for the proposed method are formulated and described in the
algorithm section of this paper.
The method described in this paper is derived in a way that it can be compared with
the real buildings of complex boundary shape to confirm that there is a need for such a
generator. Next, the method is compared with different results of other methods described
in the related work section and the discussion section of this article.

4. Algorithm
The general algorithm used to illustrate and refine the proposed method is presented
in Figure 4.
In the rest of the section, there is a detailed explanation of the steps that have been
used in the algorithm and method refinement process.
The shape of a building layout L is defined by the label of the array with 20 columns
and 20 rows. Each cell of the array represents space of 1 m by 1 m that can be either part of
the building—B or part of the empty space around it—E. The number of cells that represent
built space N is the value that corresponds to the desired area of the house. Value N is the
area of the building in square meters. A valid shape should satisfy two constraints first, all
B labels are connected into a single shape; second, there are no E labels inside layout L.

Area(L) = N (1)

The algorithm starts from the simplest case where the floor plan is represented as an
array of five columns and five rows where random values describe the overall shape. Next,
the transformation of the results into a 10 by 10 matrix with specific rules that are applied.
Finally, from previous results, a 20 by 20 array is formed. In this final step sets of rules
are applied.
The algorithm can be applied for generating buildings that are square-shaped and
have a maximum area of 400 square meters. It can give results for houses that are in the
range of 40 to 360 square meters.
Appl. Sci. 2022,
Appl. 12,
Sci.x2022,
FOR 12,
PEER
165REVIEW 9 of 20 9 of 20

Figure 4.Figure 4. Thealgorithm.


The general general algorithm.

4.1.rest
In the Generation of 5 by 5there
of the section, Arrayis a detailed explanation of the steps that have been
The first and
used in the algorithm stage of the refinement
method method generates
process. a random array using a random number
Thegenerator.
shape of aThe only input
building layoutinto
L isthe algorithm
defined by theis the
label desired
of the area
arrayofwiththe building.
20 columns In the first
stage, that number is divided into a 5 by 5 array.
and 20 rows. Each cell of the array represents space of 1 m by 1 m that can be either part
In order
of the building—B or to
partgetofvalid results,space
the empty new around
rules areit—E.
applied. The Every
number cellofofcells
the that
5 byrep-
5 array will
be transformed into 16 cells in the final 20 by 20 solution. The
resent built space N is the value that corresponds to the desired area of the house. Value first rule applied states that
N is the area of the building in square meters. A valid shape should satisfy two constraints is c(x,y)
any cell cannot have a value greater than 16 or less than 0. If one cell of this array
first, all then we can
B labels are use the expression:
connected into a single shape; second, there are no E labels inside
layout L.
0 ≤ ∀c( x,y) ≤ 16 (2)
Area(L) = N (1)
The next constraint is that the middle cell of the array Lf (2,2) is always 16. This means
Thethat
algorithm startsarray
in the final fromthethe middle
simplestofcase
the where
layoutthe floor plan
is always is represented
labeled as part of as theanbuilding
array of(expression
five columns (3)).and five rows where random values describe the overall shape.
 
Next, the transformation of the results c(0,0into
) ca 10) byc(2,0
(1,0 10) matrix
c(3,0) with
c(4,0specific
) rules that are
applied. Finally, from previous results,  c a 20cby 20 array
 (0,1) is formed.
(1,1) c(2,1) c(3,1) c(4,1)  In this
 final step sets of
rules are applied.  c(0,2) c(1,2)

16 c(3,2) c(4,2) 

(3)
The algorithm can be applied  for generating buildings
 c(0,3) c(1,3) c(2,3) c(3,3)thatc(4,3 are) square-shaped

 and
have a maximum area of 400 squarecmeters. It can give results for houses that are in the
(0,4) c(1,4) c(2,4) c(3,4) c(4,4)
range of 40 to 360 square meters.
Appl. Sci. 2022, 12, 165 10 of 20

As the consequence, in the final 20 by 20 array, not all corners will be labeled as part
of the building. In the 5 by 5 array the corner cells are as C = {C1 , C2 , C3 , C4 } and 8 middle
cells as M = {M1 , M2 , M3 , M4 } as in showed in expression (2).

 ··· ··· ··· ··· ··· 
C
 1 . . . . . .
M1
C 2

 ... ... ... 

 M2 · · · · · ·
16 M3 · · · · · ·  (4)


 ··· ··· ··· ··· ··· 
C3 M4
. . . C4 . . . . . .

... ...

Their corresponding values are Cv for the sum of C1 , C2 , C3 , and C4 and Mv for the
sum of M1 , M2 , M3 , and M4 = Relationship of values of all corner cells Cv and middle cells
Mv is defined by the formulas:

Cv = b N ∗ 0.6 − 15c (5)

Mv = N − 16 − Cv (6)
where N represents the area of the building. The next step was to get unique random
solutions for the layout. This is solved by the generation of four random real numbers r1 ,
r2 , r3 , and r4 where {rn ∈ R | 0 ≤ rn ≤ 1} which is applied in order to get values of cells
in four corners of the array. Cv1 , Cv2 , Cv3 , and Cv4 are values of cells C1 , C2 , C3 , and C4
respectively. Their value is calculated by the formula:
$ %
rn
Cvn = Cv ∗ 4 | n = {1, 2, 3, 4} (7)
∑ i =1 r i

This will determine where the most cells labeled as built are in the final solution. If
Cvn is bigger than 49, then the value is 49 and the difference is added to the other cells. The
next step is to fill Cvn values into corner cells of a 5 by 5 array. This is accomplished by
forming a set of 4 numbers {cvn1 , cvn2 , cvn3 , cvn4 } which sum is the value of the cell Cn . They
are calculated by the rules in the equation:


 [Cvn , 0, 0, 0] i f Cvn ≤ 16
[16, Cvn − 16, 0, 0] i f Cvn ≤ 32

[cvn1 , cvn2 , cvn3 , cvn4 ] = (8)

 [16, 16, Cvn − 16, 0] i f Cvn ≤ 48
[16, 16, 16, Cvn − 16]otherwise

This list is then transformed so the biggest values are closest to the middle of the
array, and the lowest is at the corners. The other two cells are randomly placed in the other
two places for Cn values. This is illustrated by the next formula:
   
... ... ... ... ... cv14 (cv12 V cv13 ) ... (cv22 V cv23 ) cv24

 ... ... ... ... ... 


 ( v12 V cv13 )
c cv11 ... cv21 ( v22 V cv23 )
c 

 ... ... 16 ... ... → ... ... 16 ... ...  (9)
   
 ... ... ... ... ...   (cv32 V cv33 ) cv31 ... cv41 (cv42 V cv43 ) 
... ... ... ... ... cv34 (cv32 V cv33 ) ... (cv42 V cv43 ) cv44
By these steps, only the middle cells of M are left to be filled. The algorithm was
formulated to firstly fill the middle cells that are surrounded by at least two 16 cells. In that
case, the cell is filled with value 16. Secondly, if the values of the cells orthogonally 1 cell
away are bigger than 32, if other conditions are met, then the cell value is 12. The rest of the
middle cells are filled with the number 8 until the sum of the array is the same as the input
number of built cells N.
There is a possibility that the sum of the array is less than N. The difference is calculated
and represented as D. In that case, the rest of the sum is split into values depending on
the value D and the number of possible cells to be filled. These values are filled in cells
Appl. Sci. 2022, 12, 165 11 of 20

which value is zero. Finally, if the values of the middle cells M that are in the first or the
last column or row m15-i not zero, and the values of the middle cells M that are connected
to them m34-i are not 16, then values of these cells are recalculated by the rule:

m34−i = 16 and m15−i = 16 − m15−i + m34−i i f m15−i + m34−i ≥ 16
m15−i > m34−i → (10)
m34−i = m15−i + m34−i and m15−i = 0 i f mfl−i + msf −i < 16
An example is shown in expression (11). Value m15-i = 12 and value m34-i = 5. In this
case, m15-i > m34-i , and therefore new values are recalculated. Without this step, empty cells
would appear inside the borders of the building.
   
... ... 12 ... ... ... ... 1 ... ...

 ... ... 5 ... ... 


 ... ... 16 ... ... 

 ... ... ... ... ... → ... ... ... ... ...  (11)
   
 ... ... ... ... ...   ... ... ... ... ... 
... ... ... ... ... ... ... ... ... ...

By these rules, all problems are solved and the next step is transforming the 5 by
5 array to a 10 by 10 array using different rules.

4.2. Generation of 10 by 10 and 20 by 20 Arrays


This array is the middle step between generating the first sketch and the final array.
Every cell value is split into four values as shown in the array:
          
... ... ... ... ... ... ... ... ... ...

c(0,0) → c(1,0) → c(2,0) → c(3,0) → c(4,0) →

 ... ...   ... ...   ... ...   ... ...   ... ... 
 

 ... ... ... ... ... ... ... ... ... ... 
 c(0,1) → c(1,1) → c(2,1) → c(3,1) → c(4,1) → 

  ... ...   ... ...   ... ...   ... ...   ... ... 
 
... ... ... ... ... ... ... ... ... ...
(12)
 
 c(0,2) → c(1,2) → c(2,2) → c(3,2) → c(4,2) → 

  ... ...   ... ...   ... ...   ... ...   ... ... 
 
 ... ... ... ... ... ... ... ... ... ... 
 c
 (0,3) → c(1,3) → c(2,3) → c(3,3) → c(4,3) → 
  ... ...   ... ...   ... ...   ... ...   ... ... 
 
 ... ... ... ... ... ... ... ... ... ... 
c(0,4) → c(1,4) → c(2,4) → c(3,4) → c(4,4) →
... ... ... ... ... ... ... ... ... ...

Isolating one cell from the 5 by 5 array transformation can be presented as:
 
c x(0,0) c x(1,0)
c(0,0) → (13)
c x(0,1) c x(1,1)

In this case value of the cell c(0,0) is equal to the sum of values cx (0,0) , cx (1,0) , cx (0,1) , and
cx (1,1) . If the value of the 5 by 5 cell is zero then four values corresponding to this value in a
10 by 10 array are 0. Similarly, if the same value is 16, then all four values are equal to 4.
When the value is between 0 and 16 first step is to split the number with the rule then no 10
by 10 cell can have a value greater than 4. In order to have a solution without empty cells
in the middle of the grid, cells values are preferably 4 or 0. Only one cell out of four per
transformation can have a value that is different than 0 or 4.
A list of four values is then applied in the 10 by 10 array based on the surrounding
cells. If the values of cells around the observed cells are 16 and 0, then minimal values
from the list are positioned close to other 0 values, and maximum values of the list are
positioned close to cells with value 16. An example of this method is presented in Figure 5.
from the list are positioned close to other 0 values, and maximum values of the list are
positioned close to cells with value 16. An example of this method is presented in Figure
from5.the list are positioned close to other 0 values, and maximum values of the list are
positioned close to cells with value 16. An example of this method is presented in Figure
Appl. Sci. 2022, 12, 165 12 of 20
5.

Figure 5. Transformation of the 5 by 5 array into a 10 by 10 array. In this example position of number
7 Figure 5. Transformation
in the left array dictates theof the 5 by 5ofarray
position a listinto a 10 by 10[0,array.
of numbers In in
0, 3, 4] this example
the position
right array. Theof number
position
Figureof75.
number 4 is
Transformationconditioned
of the 5by
bythe
5 surrounding
array into a 10 cells
by 10 to be
array.next
In to
thisthe highest
example surrounding
position of cell.
number
in the left array dictates the position of a list of numbers [0, 0, 3, 4] in the right array. The position of
7 in thenumber
left array
4 isdictates the position
conditioned of a list of numbers
by the surrounding cells to [0,
be 0, 3, 4]
next toin
thethe right array.
highest The position
surrounding cell.
of numberThe 4 is conditioned by the surrounding cells to be next to the highest
next step is the transformation of a 10 by 10 array into a 20 by 20 array surrounding cell.
by simple
The next step
transformation rules.is This
the transformation
method for generatingof a 10 bythe 10 array into a has
final array 20 by 20 array
rules similar byto simple
the
The next step
transformation
rules is
from the previous the transformation
rules. This method
chapter. Everyof a 10
forcellby 10
generating array
of 10 by 10 into
thearray a 20
final isarrayby 20 array by
has rulesinto
transformed simple
similar to of
4 cells the
transformation
20rules
by 20 from rules.
the A
array. This
valuemethod
previous ofchapter.
0 means forEvery
generating
cell are
all cells the
of 10 byfinal
zero. 10 arrayisof
A array
value has rules similar
transformed
4 means thatintoallto the cells
4four
cells of 20
ruleshave
from
by 20athe previous
array.
value Aofvalue chapter.
of 0 means
1. Values Every
between allcell ofare
0cells
and 10 by 10
zero.
4 are Aarray
value
written isof
as atransformed
4list
means
of fourthatinto
all 4four
numbers cells of have
cells
that are
20 byeither
a20value
array. of A1. value
Values of 0 means
between all
0 cells
and 4 are
are zero.
written A value
as a of
list 4
of
0 or 1. The sum of the list is equal to the value of the cell from the 10 by 10 array. means
four that
numbers all four
that cells
are either
a0 value
haveSimilaror 1. toThe
ofthe
1.sum of thebetween
Values
solution list is equal
shown to the
in0 Figure
and 5,value
4 are of the
written
minimum cell
asvalues from
a list of the
arefour 10numbers
placed bynear
10 array.
thatSimilar
adjacent arecellsto
either the
0 solution
or 1. The shown
sum of in
theFigure
list is 5, minimum
equal to the values
value
with a value of 0, and maximum values are placed near cells with a value of 4. are
of placed
the cell near
from adjacent
the 10 cells
by 10 with
array. a value
of 0,
Similar toThe and maximum
the algorithm
solution shown values are placed
in Figure to
was designed near
5, minimum cells
validate the with
values a value
final are
array of
placed 4.
where near adjacentthat
solutions cellshave
withempty
a value The of algorithm
cells 0,inandthemaximumwas of
middle designed
values to validate
are
the building, placed the cells
near
solutions finalare
that array
with where
a value
split ofsolutions
in more 4.than one that have
build-
empty
The
ing, and cells
algorithm in the
solutions middle
wasthatdesigned
have of athe
to building,
validate
different solutions
theoffinal
sum that
arrayare
the array splitthe
where
from in more
inputthan
solutions that
number one havebuilding,
are ex-
empty and
cellssolutions
in the that
middle have
of thea different
building, sum of the
solutions array
that from
are split
cluded. The last step is labeling cells with a value of 1 as built and others, with a value of thein input
more number
than one are excluded.
build-
ing, 0,
andThe last step
as solutions
empty. is labeling
that
Solutionshaveare a cells withsum
different
represented a value
asofan oforthogonal
the 1array
as built
fromand theothers,
grid input
of pixels with
anda the
number value
areimage of 0,isas
ex-
cluded. empty.
The as
created Solutions
lastpresented are
step is labeling represented
in Figure cells as an orthogonal grid of pixels and
6. with a value of 1 as built and others, with a value of the image is created
as presented
0, as empty. Solutions in Figure 6.
are represented as an orthogonal grid of pixels and the image is
created as presented in Figure 6.

Figure 6. Forming the shape of the building from the array. Cells that are labeled 1 are presented as
Figure
black 6. Forming
squares andthe shape
cells thatof
arethe building
labeled from
0 are thesquares.
white array. Cells that are labeled 1 are presented as
black squares and cells that are labeled 0 are white squares.
Figure5.6. Results
Forming the shape of the building from the array. Cells that are labeled 1 are presented as
black squaresTheand cells that are
prototype labeled 0 are white
implementation squares.
of the algorithm is in Python language. All tests are
done on a 3.1 GHz Intel Core I5 with 8 GB RAM. The inputs to the algorithm are numbers
that represent the area of the building and the number of different generated solutions.
Outputs of the algorithm are images of the layout and arrays exported in text form. In
Figure 7, the results are illustrated by randomly generated layouts from using the method
described in the previous chapter.
The
Theprototype
prototypeimplementation
implementationof ofthe
thealgorithm
algorithmisisin
inPython
Pythonlanguage.
language.AllAlltests
testsare
are
done
doneononaa3.1
3.1GHz
GHzIntel
IntelCore
CoreI5I5with
with88GB
GBRAM.
RAM.TheTheinputs
inputsto tothe
thealgorithm
algorithmare
arenumbers
numbers
that
thatrepresent
representthethearea
areaofofthe
thebuilding
buildingand
andthe
thenumber
numberof ofdifferent
differentgenerated
generatedsolutions.
solutions.
Outputs
Outputsof ofthe
thealgorithm
algorithmare areimages
imagesofofthe
thelayout
layoutand
andarrays
arraysexported
exportedin intext
textform.
form.In In
Appl. Sci. 2022, 12, 165 Figure
Figure7,7,the
theresults
resultsare
areillustrated
illustratedby
byrandomly
randomlygenerated
generatedlayouts
layoutsfrom
fromusing
usingthe 13 of 20
themethod
method
described
describedin inthe
theprevious
previouschapter.
chapter.

Figure
Figure7.
Figure Examples
7.7.Examples
Examplesof ofrandom
of randomshapes
random shapesof
shapes ofbuildings
of buildingsgenerated
buildings generated
generated by
by by
ourour
our method.
method.
method. Buildings
Buildings
Buildings in in
thisthis
inthis ex-
ex-
example
ample
amplehavehave
have their
their
their floor
floor
floor plan
plan
plan area
area
area from
from
from5050
50 square
square
square meters
meters
meters (first)
(first)
(first) toto350
to 350square
350 squaremeters
square meters(last).
meters (last).
(last).

This
Thismethod
This methodis
method isisevaluated
evaluatedby
evaluated byproducing
by producing100
producing 100different
100 differentbuilding
different buildinglayout
building layoutshapes
layout shapesfor
shapes foreach
for each
each
area
area input.
area input. Input
input. Input numbers
Input numbers
numbers that that represent
that represent the
represent the area
the area of
area of the
of the building
the building in
building in square
in square meters
metersare
square meters are
are
values
valuesfrom
values from50
from 50to
50 to350
to 350by
350 byincreasing
by increasingthe
increasing thenumber
the numberby
number by25
by 25for
25 foroverall
for overall13
overall 13different
13 differentinputs.
different inputs.The
inputs. The
The
average
averagetime
average timefor
time forthis
for thistask
this taskis
task isiscalculated
calculatedand
calculated andthe
and theresults
the resultsare
results arepresented
are presentedin
presented inFigure
in Figure8.
Figure 8.8.For
Formost
For most
most
of
of the
ofthe input
theinput values,
inputvalues,
values,N N calculations
Ncalculations
calculationsof of 100
of100 valid
100valid layouts
validlayouts takes
layoutstakes between
takesbetween 2
between22and and
and33s.s.For
3 s. Forthe
For the
the
bordering
borderingvalues
bordering valuesof
values ofN,
of N,the
N, thetime
the timefor
time forcalculation
for calculationis
calculation isishigher.
higher.
higher.

88
[s]
results [s]

77
100 results

66
generating 100

55
for generating

44
33
22
Time for
Time

11
00
00 50
50 100
100 150
150 200
200 250
250 300
300 350
350 400
400
Area
Areaofofthe
thebuilding
buildingininsquare
squaremeters
meters

Figure
Figure 8.8.Performance
Figure8. Performance
Performanceofof the
ofthe method.
themethod. The
method.TheThe graph
graph
graph presents
presents
presents the
thethe correlation
correlation
correlation between
thethe
between
between the input
inputinput param-
param-
parameter
eter
eterthat
that represents
represents the
thearea
area of
ofthe
the building
building and
and the
theaverage
average time
time for
forgenerating
generating100
100 results.
results.
that represents the area of the building and the average time for generating 100 results. Performance Perfor-
Perfor-
mance
mance isisworse
worsefor
forareas
areas that
thatare
arelesser
lesserthan
than 75
75or
orgreater
greaterthan
than 325.
325.
is worse for areas that are lesser than 75 or greater than 325.

Results are measured by the number of edges necessary to draw the border of the
building. Borders of the buildings generated by our method show that the number of
edges can be a minimum of 12 and a maximum of 54. The distribution of the results is
presented in Figure 9. The average values vary corresponding to the input parameter of
the building area.
Results are measured by the number of edges necessary to draw the border of the
Results
building. are measured
Borders by the number
of the buildings of edges
generated by ournecessary
method to draw
show thethe
that border of the
number of
building.
edges canBorders of the buildings
be a minimum of 12 andgenerated
a maximumby of
our54.method show that of
The distribution thethe
number
results of
is
edges can be
presented a minimum
in Figure 9. Theofaverage
12 andvalues
a maximum of 54. The distribution
vary corresponding of the
to the input results of
parameter is
Appl. Sci. 2022, 12, 165 14 of 20
presented in area.
the building Figure 9. The average values vary corresponding to the input parameter of
the building area.

60
60
50
50

of edges
40

of edges
40
30

Number
30

Number
20
20
10
10
0
0 0 50 100 150 200 250 300 350 400
0 50 100Area of150 200 in square
the building 250 meters
300 350 400
Area of the building in square meters
maximum minimum average
maximum minimum average
Figure 9. Efficiency of our method based on the number of edges that are necessary to draw the
Figure
shape 9.
Figure 9. Efficiency
of Efficiency
the buildingofboundary.
of our method
our methodThebased on the
minimum
based on thevalue
number
number of
thatof
we edges thatare
generated
edges that are
wasnecessary todraw
draw
for a 50 square
necessary to the
meter
the
shape ofthe
building
shape of the
withbuilding boundary.
a valueboundary.
building Theminimum
of 12. The The minimum
maximum value value that
for athat
value wegenerated
200we generated
square wasfor
meter was foraawas
building 50square
50 square meter
54. meter
building with a value of 12. The maximum value for a 200 square meter building was 54.
building with a value of 12. The maximum value for a 200 square meter building was 54.
The results are compared to the results of other methods [10,13,18,19] and real build-
The
ingsThe results
withresults
complexarecompared
are compared
borders bytoto
the the
the results
same of other
other
criteria.
results of methods
Building
methodsfloor [10,13,18,19] and real
plans are converted
[10,13,18,19] and real build-
build-
into a
ings
ings with
gridwith
of the complex borders
1 by 1 borders
complex m squares bythrough
by thesame
the samethe criteria.
simple
criteria. Building
algorithm
Building floor
floorthatplans areconverted
converted
is developed
plans are intoato
in order
into a
grid
haveofof
grid the1 1byby
uniform
the 1m1m squares
results.
squares through
The number
through of the
theedges simple
simple before algorithm
and after
algorithm that is developed
that conversion
is developed isin
the in order
same
order toexcept
have to
have
uniformuniform
in some cases results.
results.the
Thearea The number
of the
number ofbefore
ofbuildings
edges edges before
changed
and noand
after afterthan
more
conversionconversion
is5%, is the
thewhich
same wesame inexcept
considered
except some
in some
cases cases the area of the buildings changed no more than 5%,
the area of the buildings changed no more than 5%, which we considered tolerable.
tolerable. which we considered
tolerable.
First,
First,the
thedescribed
describedmethod
methodisiscompared
comparedto tothe
theresearch
researchby byMerrell
Merrelletetal.
al.[19].
[19].Only
Only
First,computer-generated
complete
complete the described method
computer-generated is compared
solutions
solutions are to the research
areconsidered.
considered. The by Merrellvalue
Themaximum
maximum et al.of
value [19].
of edgesOnly
edges isis
complete
18
18for
forthe computer-generated
thehouse
house with an area of ofsolutions
152square
152 squarearemeters.
considered.
meters. The
Figure
Figure 1010 maximum
shows
shows thethevalue of edges
distribution
distribution ofis
of the
18
the for the house with an area of 152 square meters. Figure 10 shows the distribution of the
results.
results.
results.
30
30
25
25
of edges

20
of edges

20
15
Number

15
Number

10
10
5
5
0
0 65115 165 215 265
65
115 165 215
Area of the building in square meters 265
Area of the building in square meters
Figure10.
Figure 10.Efficiency
Efficiencyofof the
the method
method byby Merrell
Merrell et [19],
et al. al. [19] , observed
observed based
based onnumber
on the the number of edges
of edges that
Figure
that
are are10.
necessaryEfficiency
necessary
to draw of
to the the
draw method
the
shape of theby
shape ofMerrell et al. [19]
the building
building boundary. , observed
boundary.
Values based
inValues
this on the
in this
research number
research
range from of to
range
10 edges
from
18.
that
10 toare
18.necessary to draw the shape of the building boundary. Values in this research range from
10 toNext,
18. the results from the research of Wang et al. [13] are evaluated area of buildings
in this research is between 85 and 155 square meters. The highest number of edges in this
paper is 14 and the average value is 10. Results are presented in Figure 11.
Appl. Sci. 2022, 12, x FOR PEER REVIEW 15 of 20
Appl. Sci. 2022, 12, x FOR PEER REVIEW 15 of 20

Next, the results from the research of Wang et al. [13] are evaluated area of buildings
Appl. Sci. 2022, 12, 165
Next, the results from the research of Wang et al. [13] are evaluated area of buildings
15 this
of 20
in this research is between 85 and 155 square meters. The highest number of edges in
in this research is between 85 and 155 square meters. The highest number of edges in this
paper is 14 and the average value is 10. Results are presented in Figure 11.
paper is 14 and the average value is 10. Results are presented in Figure 11.

30
30
25
25

Number of edges
Number of edges
20
20
15
15
10
10
5
5
0
0
65 85 105 125 145 165 185
65 85 105 125 145 165 185
Area of the building in square meters
Area of the building in square meters
Figure 11. Efficiency of the method by Wang et al. [13], observed based on the number of edges that
Figure11.
11.Efficiency
Efficiencyof
ofthe
themethod
methodbybyWang
Wangetetal.
al.[13],
[13],observed
observedbased
basedon
onthe
thenumber
numberofofedges
edges that
Figure
are necessary to draw the shape of the building boundary. Values in this research range from 4that
to
are necessary to draw the shape of the building boundary. Values in this research range from 4 to
are necessary to draw the shape of the building boundary. Values in this research range from 4 to 14.
14.
14.
The research
The researchof ofWuWuetetal.
al.[10,18]
[10,18]can
canbebeobserved
observedfrom fromtwotwoaspects.
aspects. TheThe first
first aspect
aspect is
is the The research
analysis of of Wu
the et plans
floor al. [10,18]
from can be observed
traced from from
the realtwo aspects.
world [18] The first
where aspect is
examples
the analysis of the floor plans from traced from the real world [18] where examples are
theshown
are analysis in of
areathe floor ofplans from
125 traced from the Thereal maximum
world [18] value
whereisexamples are
shown in area rangerange 75 to
of 75 to 125 square square
meters.meters.
The maximum value is 20, and 20, average
the and the
shown in
average is area
11.46 range
edges ofper
75 to 125 square
building. Themeters.
second The maximum
aspect value isof
is the analysis 20,the
and the average
MIQP-based
is 11.46 edges per building. The second aspect is the analysis of the MIQP-based com-
is 11.46 edges per building.
computer-generated layout The
[10]. second
This aspect
research is the analysis
presented a similarof therange
area MIQP-based
as com-
previously
puter-generated layout [10]. This research presented a similar area range as previously
puter-generated
mentioned, but but the layout
the maximum [10].
maximum value This research
value ofof edges presented
edges isis 16,
16, and a
and the similar
the average area
average is range
is 7.
7. Results as
Results are previously
are shown
shown
mentioned,
mentioned,
in Figure 12. but the maximum value of edges is 16, and the average is 7. Results are shown
in Figure 12.
in Figure 12.

30 30
30 30
Number of edges

Number of edges

25 25
Number of edges

Number of edges

25 25
20 20
20 20
15 15
15 15
10 10
10 10
5 5
5 5
0 0
0 0
40 60 80 100 120 140 160 40 60 80 100 120 140 160
40 60 80 100 120 140 160 40 60 80 100 120 140 160
Area of the building in square meters Area of the building in square meters
Area of the building in square meters Area of the building in square meters
(a) (b)
(a) (b)
Figure 12. Efficiency observed based
based on thenumber
numberofofedges
edgesthatthatare
arenecessary
necessarytoto draw thethe shape
Figure
Figure12.12.Efficiency
Efficiencyobserved
observed basedononthe the number of edges that are necessary draw
to draw shape
the of
shape
of
the the building
building boundary.
boundary. (a) (a) Results
Results of of real-life
real-life buildings
buildings in in
the the research
research paper
paper by by
Wu Wu
et al. et
[13]al. [13]
show
of the building boundary. (a) Results of real-life buildings in the research paper by Wu et al. [13]
show
high high variety
variety with as
with 11.46 11.46
the as the average
average number number of edges.
of edges. (b) Results of the method
by Wu by Wu[13]et
show high variety with 11.46 as the average number of (b) Results
edges. of the method
(b) Results of the method etbyal.
Wu et
al. [13] have a value of 7 for the average number of edges.
have a value
al. [13] have of 7 for the
a value of 7average number number
for the average of edges.of edges.

Finally,
Finally, the Internet databases were searched for the real buildings that have complex
Finally,the
theInternet
Internetdatabases
databaseswereweresearched
searchedforforthe
thereal
realbuildings
buildingsthatthathave
havecomplex
complex
border
border shapes
shapes inin order
order to make
to make the comparison
the comparison with the
with described
the describedalgorithm. In this
algorithm. Inpro-
this
border shapes in order to make the comparison with the described algorithm. In this pro-
cess floorfloor
process plans of buildings
plans of buildingswithwith
a simple
a formform
simple that can
thateasily
can be found
easily be in different
found in data-
different
cess floor plans of buildings with a simple form that can easily be found in different data-
bases werewere
databases eliminated.
eliminated.TheThe focus waswas
focus on thethe
buildings inin
the
thearea
arearange
rangesimilar to our
bases were eliminated. The focus was ononthe buildings
buildings in the area range similar
similar to to our
our
research
research results
results from
from better
better comparison.
comparison. In
In Figure
Figure 13
13 examples
examples of
of real
real building
building floor
floor plans
plans
research results from better comparison. In Figure 13 examples of real building floor plans
are
are shown. The range ofof an areaisisfrom
from5050toto350
350square
squaremeters.
meters. The maximum value is
areshown.
shown.The Therange
range ofananareaarea is from 50 to 350 square meters.The maximum
The maximum value is 34
value is
34
andand the
the the average
average value
value is 24.73.
is 24.73.
34 and average value is 24.73.
Appl.
Appl.Sci.
Sci.2022,
Sci. 2022,12,
2022, 12,x165
12, xFOR
FORPEER
PEERREVIEW
REVIEW 1616ofof
of20
20
20

Figure
Figure 13.
Figure13. Border
13.Border shapes
Bordershapes ofofour
shapesof our selection
ourselection ofofcomplex
selectionof complex
complexreal-life
real-lifebuildings.
buildings.

All
All the
Allthe results
theresults are
resultsare compared
arecompared
comparedandand presented
andpresented ininFigure
presentedin Figure
Figure14.14. Differences
14.Differences
Differencesinin the
inthe results
theresults of
resultsof
of
different
different method
differentmethod applications
methodapplications can
applicationscan
canbebe observed
beobserved based
observedbased
basedonon the
onthe parameter
theparameter of the
parameterofofthe number
thenumber of
numberofof
edge
edge counts.
edgecounts. The
counts.The overall
Theoverall average
overallaverage
averageofof edges
ofedges per
edgesper building
buildingisisis24.73
perbuilding 24.73 for
24.73for selected
forselected real
selectedreal buildings,
realbuildings,
buildings,
28.88
28.88 for
for the
the method
method described
described in
in the
the paper,
paper, and
and 10.33
10.33 for
for other
other
28.88 for the method described in the paper, and 10.33 for other methods. methods.
methods.

4040
Real-life
Real-lifebuildings
buildings
3535
Number of edges
Number of edges

3030 Our
Ourmethod
method- -average
average
2525 Our
Ourmethod
method- -minimum
minimum
2020
Merrell,
Merrell,etetal.al.
1515
1010 Wang,
Wang,etetal.al.
55 Wu,
Wu,etetal.al.
00
00 100
100 200
200 300
300 400
400
Area
Areaofofthe
thebuilding
buildingininsquare
squaremeters
meters
Figure
Figure14.
Figure 14.Comparison
14. Comparisonof
Comparison ofour
of ourmethod
our methodto
method toall
to allmethods
all methodsselected
methods selectedfrom
selected fromresearch
from research[10,13,18,19]
research [10,13,18,19]and
[10,13,18,19] andto
and totoour
our
our
selection
selectionofofreal-life
real-lifebuildings
buildingswith
withcomplex
complexbuilding
buildingfloor
floorplan
planborders.
borders.
selection of real-life buildings with complex building floor plan borders.

6.
6.6.Discussion
Discussion
Discussion
The
Theproblem
The problemof ofofbuilding
building boundary
buildingboundary
boundary generationisiswidely
generation
generation iswidely
widelyaddressed
addressed
addressed inin incontemporary
contemporary
contemporary re-
research
research
search and
andand publications.
publications. InIn
publications. Inthe
the thereferenced
referenced
referenced publications
publications
publications discussed
discussed
discussed methodologies,
methodologies,
methodologies, meth-
meth-
methods,
ods,
ods,algorithms,
algorithms,
algorithms, and
andmore
and more or oror
less
more less
lessautomated
automated frameworks
frameworks
automated and
andsoftware
and software
frameworks tools
tools tend
software toolstotend totoclus-
cluster
tend into
clus-
ter
ter into coherent groups that use the related principles but with different impacts onthe
into
coherent coherent
groups groups
that use that
the use
relatedthe related
principlesprinciples
but with but with
different different
impacts on impacts
the on
abstractionthe
abstraction
level level
leveland
and generality
abstraction and generality
of proposedofof
generality proposed
proposedsolutions.
solutions. solutions.
Appl. Sci. 2022, 12, 165 17 of 20

One cluster is mainly oriented to simple regular building boundaries development


that solely serves as the container of internal. They are usually constrained by the internal
functionality disposition. For this group, the main focus appears to be the building floor
plan layout or the architectural style they analyzed observed is not contemporary or visually
challenging by the form. A few of those researches argue the possibility of combining
simple building boundary shapes to get more complex variations or offer low-resolution
results, but most of them are significantly limited in the number of variations achieved in a
specific time frame. The external constraints are more or less ignored and do not represent
a driving force of the automatic building boundary generation process.
The other cluster, with a significantly lower number of research works, focuses on
relatively complex building boundaries generation that makes them suitable for cross-
reference performance comparison with the approach described in this article. The results
of three research works from this group are compared with regard to the presented novel
approach. They were selected because their algorithms produced results that are more
complex compared to others, listed in Section 2 making them an ideal validation benchmark.
The smallest research cluster uses external boundary constraints as the driving force
of building boundaries generation but different methods used (knowledge-based system)
were the main obstacle in strict comparisons.
There were no research works seriously focusing on the methodology, methods, and
algorithms that support the production of complex boundary shapes in large quantities
within a reasonable time frame.
The results of the research methods of the papers used as benchmarks for valida-
tion [10,13,19] are derived from a maximum of a 174 square meter building area. The
results for larger buildings could not be obtained from the current examples. The algorithm
presented in this paper produces results for buildings up to 350 square meters. The pos-
sibility of other methodologies generating similar results is currently highly unlikely but
may be possible in further development.
The main obstacle of the methodology presented in research papers [10,13,19] was
the heavy internal functionality interrelations and dependencies that are computationally
demanding. That is why the inherent limitation of variations is understandable.
The goal of this paper is to create the building boundaries in the form of constraints
influenced by outer forces but not to completely exclude the premises of interior functional-
ity either. There are research works [9,18] that can produce building layouts if the border
constraint of the building is provided. The expanded version of the methodology applying
grid systems, used in this paper, is also planned to be upgraded for the internal layout
generation in the future.
Figure 11 summarizes the advantages and disadvantages of the benchmark set with
regard to the proposed method and algorithm. Almost all of the compared research
methods produce results that are below the minimum value of the algorithm presented
in this paper. The results clearly show that the novel method, proposed by this paper,
fills in the current research gap in the referenced scientific field. The area of interest is a
specific type of building boundary generator with a capacity for creating numerous design
variations. The uses for these results are numerous in the specific fields of architecture,
gaming, generative design, etc.
For example, the most common of the real-life complex building boundary has borders
with the number of edges that are mostly between the minimal and average results of
our algorithm. The analyzed buildings are not average but rather common examples of
the real-life set mainly because the basic rectangular and simple shape boundaries are
more commonly seen than the complex ones. Although not such common, buildings with
complex boundary shapes are the mainstream of the presented approach.
The internal function-based approach usually results in basic and simple shapes of
boundary layers. On the contrary, contemporary architecture is sometimes strongly influ-
enced by outer factors like adapting to the force of the wind or the increase of daylight
Appl. Sci. 2022, 12, 165 18 of 20

insulation or even dominant visual message making the building a recognizable environ-
mental marker.
Concerning system sciences, the general specification of any system includes func-
tional and non-functional requirements, where the latter addresses the constraints under
which the former have to be applied. The implementation of non-functional requirements
is generally much more demanding. The trend of automatic generation of residential
buildings 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. The is that the
functionality is not a key component in the digital and video game industry residential
building simulations. The emphasis is on the recognizable visual style and game narrative.
The form of the building acts as a container for the interior space but it is not solely defined
or influenced by it.
This was the main reason to ignore the interior functionality in the proposed approach
in order to enable the rapid generation of building boundary variations into which the
interior functionality may be included afterward.

7. Conclusions
The automatic generation of complex building boundaries, in contemporary research
and engineering projects and practices, is heavily processing and data volume bounded.
Even with the available processing power and storage capacity of commercial computer
systems nowadays the interactive and reactive design is rather limited. The main challenge
is the rapid generation of a large number of complex building boundaries in a reasonable
time frame.
The other dominant obstacle is that the majority of methods rely on the interior
functional constraints as a driving force dominantly resulting in a low level of variability
and simple rectangular geometry of generated building boundaries.
As a basis for the automated generation of various building boundaries, the solution
presented in this paper introduces a novel approach that ignores the internal (functional)
and focuses only on the external (non-functional) impacts. The primary orientation on
external impacts may be, at any instance, extended by suitable complementary traditional
methodology. The applied research methodology and presented method rely on a devel-
oped extendible rule-based system that simplifies building boundaries creation by recursive
application of formulated spatial grid generation algorithm. Based on starting parameter
values (mainly the lot and building area spaces) the algorithm tends to create a set of grids
that satisfy initial constraints by marking the individual grid cells as part of the building
or empty.
The presented conceptual framework model served as a foundation for creating a
prototype software application that supports the experimental generation of grid arrays
that are transformed into readable images of residential building boundaries. For the initial
validation of the developed methodology, method, and algorithm, the concrete parametric
resolution is set to 1 m.
The comparative analysis has shown that the presented approach overcomes some
of the limitations of previous related research that generate building boundaries in sim-
ple rectangular form or with limited variability. The proposed method, in its current
stage, outperforms discussed existing methods concerning complex building boundary
shape generation.

Author Contributions: Conceptualization, M.L.; methodology, A.P. and B.P.; software, M.L., A.P. and
B.P.; validation, M.L.; investigation, resources, data curation, and visualization, M.L., A.P. and B.P.;
writing—original draft preparation, M.L.; formal analysis, B.P.; writing—review and editing, A.P. and
B.P. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Institutional Review Board Statement: Not applicable.
Appl. Sci. 2022, 12, 165 19 of 20

Informed Consent Statement: Not applicable.


Data Availability Statement: Our Python application is open-source and can be publicly accessed [35].
Conflicts of Interest: The authors declare no conflict of interest.

References
1. Shekhawat, K. Algorithm for Constructing an Optimally Connected Rectangular Floor Plan. Front. Archit. Res. 2014, 3, 324–330.
[CrossRef]
2. Kozminski, K.; Kinnen, E. An Algorithm for Finding a Rectangular Dual of a Planar Graph for Use in Area Planning for
VLSI Integrated Circuits. In Proceedings of the 21st Design Automation Conference Proceedings, Albuquerque, NM, USA,
25–27 June 1984; pp. 655–656.
3. Bhasker, J.; Sahni, S. A Linear Algorithm to Find a Rectangular Dual of a Planar Triangulated Graph. Algorithmica 1988, 3, 247–278.
[CrossRef]
4. Wang, X.-Y.; Yang, Y.; Zhang, K. Customization and Generation of Floor Plans Based on Graph Transformations. Autom. Constr.
2018, 94, 405–416. [CrossRef]
5. Martin, J. Procedural House Generation: A Method for Dynamically Generating Floor Plans. In Proceedings of the Symposium
on Interactive 3D Graphics and Games, Redwood City, CA, USA, 14–17 March 2006; Volume 2.
6. Flemming, U.; Coyne, R.; Glavin, T.; Rychener, M. A generative expert system for the design of building layouts. In Applications of
Artificial Intelligence in Engineering Problems; Springer: Berlin/Heidelberg, Germany, 1986; pp. 811–821.
7. Del Rio-Cidoncha, G.; Martínez-Palacios, J.; Iglesias, J.E. A Multidisciplinary Model for Floorplan Design. Int. J. Prod. Res. 2007,
45, 3457–3476. [CrossRef]
8. Nauata, N.; Chang, K.-H.; Cheng, C.-Y.; Mori, G.; Furukawa, Y. House-Gan: Relational Generative Adversarial Networks for
Graph-Constrained House Layout Generation. In Proceedings of the European Conference on Computer Vision, Glasgow, UK,
23–28 August 2020; pp. 162–177.
9. Peng, C.-H.; Yang, Y.-L.; Wonka, P. Computing Layouts with Deformable Templates. ACM Trans. Graph. 2014, 33, 99:1–99:11.
[CrossRef]
10. Wu, W.; Fan, L.; Liu, L.; Wonka, P. MIQP-based Layout Design for Building Interiors. Comput. Graph. Forum 2018, 37, 511–521.
[CrossRef]
11. Li, S.-P.; Frazer, J.H.; Tang, M.-X. A Constraint Based Generative System for Floor Layouts. 2000. Available online: http:
//papers.cumincad.org/data/works/att/5b5d.content.pdf (accessed on 6 November 2021).
12. Harada, M.; Witkin, A.; Baraff, D. Interactive Physically-Based Manipulation of Discrete/Continuous Models. In Proceedings
of the 22nd Annual Conference on Computer Graphics and Interactive Techniques, Los Angeles, CA, USA, 6–11 August 1995;
pp. 199–208.
13. Wang, X.-Y.; Zhang, K. Generating Layout Designs from High-Level Specifications. Autom. Constr. 2020, 119, 103288. [CrossRef]
14. Duarte, J.P. A Discursive Grammar for Customizing Mass Housing: The Case of Siza’s Houses at Malagueira. Autom. Constr.
2005, 14, 265–275. [CrossRef]
15. Nilkaew, P. Assistant Tool for Architectural Layout Design by Genetic Algorithm. 2006. Available online: http://papers.cumincad.
org/data/works/att/caadria2006_641.content.pdf (accessed on 4 November 2021).
16. Narahara, T.; Terzidis, K. Multiple-Constraint Genetic Algorithm in Housing Design. 2006. Available online: http://papers.
cumincad.org/data/works/att/acadia06_418.content.pdf (accessed on 4 November 2021).
17. Bahrehmand, A.; Batard, T.; Marques, R.; Evans, A.; Blat, J. Optimizing Layout Using Spatial Quality Metrics and User Preferences.
Graph. Models 2017, 93, 25–38. [CrossRef]
18. Wu, W.; Fu, X.-M.; Tang, R.; Wang, Y.; Qi, Y.-H.; Liu, L. Data-Driven Interior Plan Generation for Residential Buildings. ACM
Trans. Graph. TOG 2019, 38, 1–12. [CrossRef]
19. Merrell, P.; Schkufza, E.; Koltun, V. Computer-Generated Residential Building Layouts. ACM Trans. Graph. TOG 2010, 29, 1–12.
[CrossRef]
20. Hua, H. Irregular Architectural Layout Synthesis with Graphical Inputs. Autom. Constr. 2016, 72, 388–396. [CrossRef]
21. AlOmani, A.; El-Rayes, K. Automated Generation of Optimal Thematic Architectural Layouts Using Image Processing. Autom.
Constr. 2020, 117, 103255. [CrossRef]
22. Bao, F.; Yan, D.-M.; Mitra, N.J.; Wonka, P. Generating and Exploring Good Building Layouts. ACM Trans. Graph. TOG 2013,
32, 122. [CrossRef]
23. Cruz, C.; Karakiewicz, J.; Kirley, M. Towards the Implementation of a Composite Cellular Automata Model for the Explo-
ration of Design Space. 2016. Available online: https://www.researchgate.net/publication/299597241_TOWARDS_THE_
IMPLEMENTATION_OF_A_COMPOSITE_CELLULAR_AUTOMATA_MODEL_FOR_THE_EXPLORATION_OF_DESIGN_
SPACE (accessed on 4 November 2021).
24. Krawczyk, R.J. Cellular Automata: Dying to Live Again, Architecture, Art, Design. In Designing Beauty: The Art of Cellular
Automata; Springer: Berlin/Heidelberg, Germany, 2016; pp. 39–52.
25. Petruševski, L.; Devetaković, M.; Mitrović, B. Self-Replicating Systems in Spatial Form Generation: The Concept of Cellular
Automata. Spatium 2009, 8–14. [CrossRef]
Appl. Sci. 2022, 12, 165 20 of 20

26. Herr, C.M.; Kvan, T. Adapting Cellular Automata to Support the Architectural Design Process. Autom. Constr. 2007, 16, 61–69.
[CrossRef]
27. Anzalone, P.; Clarke, C. Architectural Applications of Complex Adaptive Systems. 2003. Available online: http://papers.
cumincad.org/data/works/att/acadia03_042.content.09646.pdf (accessed on 4 November 2021).
28. Gardner, M. Mathematical Games. Sci. Am. 1970, 222, 132–140. [CrossRef]
29. Araghi, S.K.; Stouffs, R. Exploring Cellular Automata for High Density Residential Building Form Generation. Autom. Constr.
2015, 49, 152–162. [CrossRef]
30. Krawczyk, R.J. Architectural Interpretation of Cellular Automata. 2002. Available online: https://mypages.iit.edu/~{}krawczyk/
rjkga02.pdf (accessed on 4 November 2021).
31. Coates, P.; Healy, N.; Lamb, C.; Voon, W.L. The Use of Cellular Automata to Explore Bottom up Architectonic Rules. 1996.
Available online: https://repository.uel.ac.uk/download/d3aedf91a9fe865d5d4863f29c921ad4b4a43b77838fb3ba785cfaa4db9
7b5b9/507983/Coates%2C%20P%20%281996%29%20Eurographics.pdf (accessed on 4 November 2021).
32. Ford, R.C. Think Like Ants, Not Like Gods: A Study of Cellular Automata and Its Validity Within the Architectural Design
Process. Master’s Thesis, Unitec Institute of Technology, Auckland, New Zealand, 2013.
33. Herr, C.M.; Ford, R.C. Cellular Automata in Architectural Design: From Generic Systems to Specific Design Tools. Autom. Constr.
2016, 72, 39–45. [CrossRef]
34. Martin, R.C. Agile Software Development, Principles, Patterns and Practices; Pearson Education Limited: London, UK, 2014.
35. FPgenerator. 2021. Available online: https://github.com/ArchitectureMarko/FPgenerator (accessed on 4 November 2021).

You might also like