Introduction

Muqarnas, a structure that has continually been used from the past to the present, is known as an architectural decorative element. Thus far, the formal properties of the existing muqarnas have been examined by studies such as those of Elkhateeb (2012), Castera (2007), Kharazmi and Sarhangi (2016) and Kashef (2017). In addition, researchers such as Hamekasi et al. (2011) and Senhaji and Benslimane (2019) explored the creation of muqarnas with new techniques.

It is known that the plan drawings (ground projection plans) of muqarnas have been made since ancient times. For example, one of the oldest examples is the plate found at Takht-i Sulayman (dating to the 1270 s) that contains squares, triangles and rhomboids (Harb 1978). According to Necipoglu (1995), this is the oldest known example of architectural drawing. There are also many muqarnas plans in the Topkapi, Tashkent and Mirza Akbar scrolls (Necipoglu 1995).

Muqarnas have been analysed by various researchers using different classifications. For example, Hamekasi et al. (2011) classifies muqarnas by relationship to construction types. According to this classification, there are three types of muqarnas: corbelled, superimposed and suspended. The cells of corbelled muqarnas are carved from the block face. This process may be performed before or after assembly. In superimposed muqarnas, first the supporting surface (such as a dome or a vault) is made, and muqarnas cells are placed on these surfaces. In suspended muqarnas, the components are attached to the architectural structure after they have been produced on the ground. In this type, space is left between components and the surface where the components are placed (Hamekasi et al. 2011). A fifteenth-century mathematician, Al-Kashi, classified muqarnas according to formal characteristics. Al-Kashi indicated that, in 3D cells of muqarnas, there are vertical facets and roofs (Dold-Samplonius 1992; Gherardini and Leali 2016; Harmsen 2006) (Fig. 1). Al-Kashi’s classification is as follows: the first two types are simple muqarnas and clay-plastered muqarnas (or mutayyan), both of which have plane facets and roofs. What distinguishes a clay-plastered muqarnas is that the heights of its layers might be different, and some of its layers might not have facets (Dold-Samplonius and Harmsen 2005). The other two types are the curved muqarnas and Shirazi muqarnas with curved roofs (Dold-Samplonius 1992). A curved muqarnas is similar to a simple muqarnas except for its curved roofs. A shirazi muqarnas is similar to a curved muqarnas except for its variety of cells. Moreover, Dold-Samplonius and Harmsen (2005) and Özdural (1990) stated that in the illustrations of Al-Kashi, the geometries in the projection plans of muqarnas cells can be square, rhombus, almond, biped and barley kernels. A biped and an almond make up a rhombus. In addition, as Harmsen (2006) illustrated, there are also half-square, half-rhombus, jug-shaped, and large biped elements in muqarnas plan projections according to Al-Kashi (Fig. 2). However, as Özdural (1990) noted, Al-Kashi explains muqarnas by reducing them to basic elements, however, thus neglecting their design and composition.

Fig. 1
figure 1

Cell of a curved muqarnas and an intermediate element: Image: author, redrawn using the drawings of Harmsen (2006) and Dold-Samplonius and Harmsen (2005)

Fig. 2
figure 2

Muqarnas elements in 2D (Harmsen 2006)

Muqarnas, which appear formally complex, are in fact formed according to simple rules (Dold-Samplonius 1992; Gherardini and Leali 2016). Özdural (1991) and Alacam et al. (2017) agree that muqarnas are created by sequentially raising the plan drawing from 2D to 3D. Uluengin (2018) and Takahashi (2019) also analysed the muqarnas, starting from the ground projection plan. It is observed that in these studies, first, the principle of placing the muqarnas plan on a grid system was applied. This approach is an important step in understanding the design and composition of muqarnas.

Research Aims and Methods

According to these plan analyses, it is observed that most of the plans of muqarnas are composed of various types of star polygons. The latter can be, for example, twelve-, six- or five-point stars. Such stars are also common in Islamic patterns made in two dimensions. The lengths of the edges of various types of stars in these patterns are usually equal within each type. This type of star formation in Islamic patterns is discussed in Bourgoin (1879), Schneider (1980), Critchlow (1983), Hankin (1998), Broug (2008), Cromwell (2009), Bodner (2012), Sarhangi (2012), Redondo-Buitrago and Huylebrouck (2015) and Bonner (2017). It is known that many muqarnas formed on the basis of a radial grid are created from many overlapping reference circles (Necipoglu 1995). When we examine the Topkapi scroll, it is clear that the stars in many muqarnas plans are produced from reference circles, and therefore the lengths of star polygons’ edges are usually equal.

However, in many muqarnas plans, irregular star polygons with unequal edge lengths are observed. In addition, in special cases, such as that of the muqarnas plan in Özdural’s study (1991), where some stars remain in the corners of the frame, the lengths of their edges are unequal.

An examination of the the muqarnas plan analysis in Uluengin (2018) and muqarnas drawings in Necipoglu (1995) shows that the edges of many stars are unequal in length. However, neither Uluengin nor Necipoğlu provides a clear mathematical explanation of this phenomenon. Therefore, the present research aimed to answer the following questions: What was the geometry behind the stars in the muqarnas plans with unequal edge lengths? What kind of reference grid was there? Was there a geometric reason behind the unevenness of the edges of stars in these decorations? This study also aimed to determine the reason the edge lengths of various stars in the muqarnas plans are not equal within each star type. In addition, determining the geometric background of this phenomenon can allow an infrastructure to be created for the muqarnas that can be formed by new techniques.

To achieve these aims, the muqarnas at the main gate of the Atik Valide Mosque (Fig. 3) with irregular star polygons in its plan was selected for examination. This is located in the Atik Valide Complex in the Toptasi district of the Uskudar county of Istanbul. The mosque was ordered to be built in 1570 by Nurbanu Sultan, the mother of Murad III, and built by the architect Sinan (Eris et al. 2013).

Fig. 3
figure 3

Analysed muqarnas at the main gate of the Atik Valide Mosque (photo by authors)

The hypothesis of this study is that in the plan of the muqarnas of the main gate of the Atik Valide Mosque where the lengths of star polygon edges are unequal, the drawing layout of the muqarnas plan is formed with ellipses. When stars are placed in the ellipse-shaped layout, the edges of some polygonal stars will naturally not be of the same length, but at the same time their order and proportions will be consistent overall.

To determine the exact proportions of the plan, the selected muqarnas was scanned with the Faro Focus 3D laser scanning device. The photos obtained as a result of laser scanning were combined in the Scene programme to form a 3D point cloud model of the muqarnas. The plan view of the muqarnas was obtained in the Scene programme (Fig. 4).

Fig. 4
figure 4

Plan view of muqarnas obtained by laser scanning

First, the muqarnas plan was drawn on the obtained image using the AutoCAD software. Afterwards, a systematic formation of this plan based on mathematical rules within the framework of the shape grammars theory was studied.

The grid system to be used as a layout was not considered as the boundaries of the muqarnas plan. In contrast, systematic analysis was performed by assuming that the plan of the muqarnas was a certain part of a large grid.

At the same time this system was being created, the resulting pattern in the case of equal edge lengths of star polygons in the plan was explored. This method was used as a test to prove the proposed hypothesis. Since the lengths of the edges of star polygons in Islamic patterns are generally equal, the authors focused on the possibility that the edge lengths of star polygons in this muqarnas may be equal in length. However, the analysis revealed that the lengths of edges were unlikely to be equal.

Afterwards, a parametric muqarnas was created using the plan of the muqarnas obtained from the analyses. Grasshopper, a visual programming language, was used for creating parametric muqarnas. Shape grammar theory, used in the analysis of the muqarnas plan, was also used in the creation of parametric muqarnas. With the exception of a few details that would simplify the coding process, the same principles were implemented as software code. The details are described in the following sections.

Analysis of the Muqarnas at the Main Gate of the Atik Valide Mosque

Set of Rules (in 2D)

For the geometric analysis of the selected muqarnas plan, the main axes were formed with the angle of 45° between them (rule 1, subrule 1), and the intermediary axes (rule 1, subrule 2) were formed with the angle of 22.5° between them (in what follows all rules and subrules refer to Table 1).

Table 1 Set of rules (in 2D)

An ellipse was then formed with its two focal points on a formed intermediary axis (rule 2, subrule 1). This ellipse can be formed on any intermediary axis. This ellipse was then replicated into eight in a circular formation. The two focal points of each ellipse correspond to the intermediary axes (rule 2, subrule 2). Thus, a circle was defined at the intersection of ellipses. The centre of this circle is the intersection of the axes.

To create the first star formation, the intersection points between the circle and the main axes were first determined. Then, based on the centre of the circle, another circle with a smaller radius was created by scaling the circle. The intersection of the smaller circle with the intermediary axes was determined (rule 3, subrule 1). Then, the lines between these points were formed to create the first star formation (rule 3, subrule 2).

To create the second star formation, another circle was formed based on the same centre by scaling the smaller circle. The intersection points between the last circle and the main axes were determined (rule 4, subrule 1). By forming lines between these points and the points on the intermediary axes determined in the first star formation, the second star formation was created (rule 4, subrule 2).

For the third star formation, the intersection points of the related ellipses were first determined. These intersection points are on a single circle, assuming that the intersection point of the axes (the origin) is the centre (rule 5, subrule 1). The lines were formed between the points defined on the main axes for the first star formation and the intersection points of these ellipses, and thus the third star formation was created (rule 5, subrule 2).

For the fourth star formation, the intersection points of the related ellipses were first determined. Again, these intersection points are on a single circle, assuming that the intersection point of the axes (the origin) is the centre (rule 6, subrule 1). The lines were formed between the points on the last formed star and the intersection points of these ellipses, and the fourth star formation was created (rule 6, subrule 2).

In Rule 7, a frame was first created through the boundaries of the ellipse grid (rule 7, subrule 1). Then, the corresponding ellipse intersection points were determined on the ellipse grid to create a secondary ellipse grid (rule 7, subrule 2). The ellipse grid was then copied with reference to these points (rule 7, subrule 3). The obtained grid was replicated into eight arranged in a circular formation with respect to the centre of the circle. Thus, the secondary ellipse grid was created (rule 7, subrule 4).

For the first six-point irregular star formation, one point on the last-formed star and one point at the intersection of the secondary ellipse grid were determined first. The distance between these points was regarded as a diameter, and a circle was created (rule 8, subrule 1). A hexagon was formed inside this circle (rule 8, subrule 2). Then, the corner points of this hexagon and the ellipse grid’s intersection points closest to this hexagon were determined. The lines were formed between the related points. As a result, the new star, a six-point irregular star polygon, was constructed (rule 8, subrule 3). The latter was replicated into eight arranged in a circular formation with respect to the centre of the circle (rule 8, subrule 4).

The corresponding intersection points of the ellipse grid and a pentagon were determined for the five-point irregular star polygon formation. Three of these points were also the corresponding corner points of six-point irregular star polygons. The lines were formed between the related points and the pentagon (rule 9, subrule 1). Thus, the five-point irregular star polygon appeared automatically. The resulting five-point irregular star polygon was replicated into eight arranged in a circular formation with respect to the centre of the circle (rule 9, subrule 2).

For the second six-point irregular star formation, two points were determined at the intersection of the ellipse grid. The distance between these points was regarded as a diameter, and a circle was created (rule 10, subrule 1). A hexagon was formed inside this circle (rule 10, subrule 2). Then, the corner points of this hexagon and the ellipse grid’s intersection points closest to this hexagon were determined. The ellipse grid’s points were actually the corners of the first six-point irregular star and five-point irregular star. The lines were formed between the related points. As a result, an irregular star polygon appeared automatically (rule 10, subrule 3). The resulting six-point irregular star polygon was replicated into eight arranged in a circular formation with respect to the centre of the circle (rule 10, subrule 4).

In Rule 11, almonds were created in the smallest module in the frame by forming the lines in the spaces between the irregular star polygons (rule 11, subrule 1). These almonds were replicated to cover the whole pattern (rule 11, subrule 2).

In Rule 12, the grids and axes were eliminated (rule 12, subrule 1). The geometry of the plan of muqarnas was obtained by eliminating a half of the pattern (rule 12, subrule 2).

Proof/verification

In the muqarnas plan analysis, it was observed that star polygons did not have edges of the same length. However, since it was known that the edges of star polygons were known to have equal lengths in many muqarnas plans and Islamic pattern samples, the idea emerged to verify that the edge lengths of star polygons in the analysed muqarnas plan were unequal. In performing this verification, the edges of star polygons were assumed to have equal lengths. The relevant research question was as follows: if the edge lengths of star polygons in this selected muqarnas plan were equal, would the same or similar plan emerge?

To this end, regular star polygons (star polygons with equal edge lengths) were created first. To create a six-point star, two circles were first formed and two hexagons were placed inside the circles. The corner points of hexagons were joined to form the lines. Thus, a six-point star was created. If desired, the almond alignments could be added by directing them towards the centre of the circles (Table 2). To create a five-point star, two circles were formed and two pentagons were placed inside the circles. The lines were created by using the corner points of the pentagons. Thus, a five-point star was created. If desired, almond alignments could be added by directing them towards the centre of the circles (Table 2).

Table 2 Formation of regular six- and five-point stars

During the verification, the inner star pattern of the muqarnas obtained from the previous analysis was retained, and it turned out that star polygons with edges of equal lengths could not, in any case, form the original plan of the selected muqarnas. As shown in Table 3a, when the outer arms of the regular six-point stars touch each other, a gap appears between the inner arms of the regular six-point stars and the inner circle. When the whole composition was examined, it was observed that the arms of the stars did not merge and remained exposed in many points. In addition, as shown in Table 3b, when the regular six-point stars were placed so that they touched the endpoints of the inner star pattern, their outer arms overlapped each other. In other words, if the regular six-point stars were positioned so that their arms closest to the centre were touching each other, their outer arms overlapped. The same result was obtained when the scale was changed (Table 3c).

Table 3 Problems in the use of six- and five-point regular star polygons with equal edge lengths

The Third Dimension

A muqarnas is created by combining various types of cells. It is observed that the muqarnas examined in this study is created with six types of cells (Table 4a–f). Apart from the main and intermediate cells, there are parts in pentagon-shape and six-point star geometry, which can be described as two types of ornamental bases (Table 4g, h). There are detailed ornaments on these base parts that are placed at the star centres in the muqarnas plan.

Table 4 Types of cells in the muqarnas at the main gate of the Atik Valide Sultan Mosque

The main cells that constitute the muqarnas can be defined as triangle cells (Table 4a), deltoid cells (Table 4b) and almond cells (Table 4c). These main cells have two stages. For example, there is a grading in the middle part of the body of a triangle cell and a deltoid cell. There is a radial grading in an almond cell from the bottom to the wings. A triangle cell has a plain body, while a deltoid cell has a double-winged body. In the examined muqarnas, triangle cells are used in the arms of five-point irregular star polygons. Deltoid cells are used in the arms of six-point irregular star polygons.

The intermediate cells of muqarnas can be defined as intermediate triangle cells (Table 4d), intermediate deltoid cells (Table 4e) and biped cells (Table 4f). Intermediate cells are those that act as a binding in the joints of the main cells. As in the case of the main cells, intermediate triangle cells are used in the arms of five-point irregular star polygons, while intermediate deltoid cells are used in the arms of six-point irregular star polygons.

In order to understand muqarnas composition, three types of main cells, three types of intermediate cells and two types of ornamental bases are defined in various colours on the muqarnas plan. As the study of the colour muqarnas plan shows, intermediate triangle cells and triangle cells create a five-point irregular star polygon. In addition, intermediate deltoid cells and deltoid cells create a six-point irregular star polygon (Fig. 5).

Fig. 5
figure 5

Composition of cells in the muqarnas plan

An examination of the muqarnas plan shows that cells vary by dimension within their types. It is determined that triangle cells are of five different sizes (Table 5a), deltoid cells are of two different sizes (Table 5b), almond cells are of nine different sizes (Table 5c), intermediate triangle cells are of a single size (Table 5d), intermediate deltoid cells are of six different sizes (Table 5e) and biped cells have six different sizes (Table 5f). In addition, the pentagon (the centre of a five-point irregular star polygon) type has one size (Table 5g), and the six-point star (the centre of a six-point irregular star polygon) type has one size (Table 5h).

Table 5 Analysis of locations and sizes of cells in the muqarnas plan

Cell Combinations

The holistic form of the muqarnas is created with a combination of various types of cells. The cells are arranged into different layers in the muqarnas. As an image obtained by laser scanning shows (Fig. 6), the muqarnas consists of seven layers. In Fig. 7, the layers are separated by colour tones on the muqarnas plan. As five- and six-point irregular stars in the plan rise between the layers, their arms correspond to different layers. Each irregular star has two layer transitions.

Fig. 6
figure 6

Front view of the muqarnas

Fig. 7
figure 7

Layer representation of the muqarnas

One cell combination at the second layer, one cell combination at the third layer, two cell combinations at the fourth layer, one cell combination at the fifth layer, three cell combinations at the sixth layer and one cell combination at the seventh layer are examined. The combinations of cells discussed are shown on the muqarnas plan and a 3D model in different colours (Fig. 8).

Fig. 8
figure 8

Representation of various cell combination compositions

The cells and their compositions are as follows.

  • In the second layer, the composition obtained by combining almond cells, intermediate deltoid cell and half-deltoid intermediate cells is exemplified (Table 6a).

    Table 6 Cell combinations
  • In the third layer, the composition obtained by combining an almond cell, a biped cell and a triangle cell is exemplified (Table 6b).

  • In the first example in the fourth layer, the composition obtained by combining deltoid cells, a biped cell and a six-point star ornamental base (the centre of a six-point irregular star polygon) is exemplified (Table 6c). In other words, a combination of two arms of a six-point irregular star polygon and its centre is created.

  • In the second example in the fourth layer, the composition obtained by the combination of an almond cell and deltoid cells is exemplified (Table 6d).

  • In the fifth layer, the composition obtained by the combination of intermediate deltoid cells, almond cells and a six-point star ornamental base (the centre of a six-point irregular star polygon) is exemplified. In other words, the combination of four arms of a six-point irregular star polygon and its centre is created (Table 6e).

  • In the first example in the sixth layer, the composition obtained by the combination of triangle cells, biped cells, intermediate triangle cells and a pentagon (the centre of a five-point irregular star polygon) is exemplified (Table 6f). In other words, a combination with a five-point irregular star polygon composition is created.

  • In the second example in the sixth layer, the composition obtained by the combination of deltoid cells, a biped cell, intermediate deltoid cells and a six-point star ornamental base (the centre of a six-point irregular star polygon) is exemplified (Table 6g). In other words, a six-point irregular star polygon composition is created.

  • In the third example in the sixth layer, the composition obtained by the combination of triangle cells, biped cells and a pentagon (the centre of a five-point irregular star polygon) is exemplified (Table 6h). In other words, a combination of three arms of a five-point irregular star polygon and its centre is created.

  • In the seventh layer, the composition obtained by the combination of intermediate deltoid cells and half-deltoid intermediate cells is exemplified (Table 6i). In other words, a partial formation of six-point irregular star polygons is created.

Parameterization

Creation of Parametric Geometry

To parameterize the selected muqarnas, the plan was first prepared in 2D in Grasshopper. While this plan was being prepared, the rules in Table 1 were applied. The only difference is that a quarter of the pattern was formed to generate a shorter code. Additionally, to obtain the final shape, a mirroring operation was performed.

As Table 7 shows, the first, second, third and fourth stars were formed in relation to the ellipse grid (Table 7a). The six-point irregular star was then formed in relation to the secondary ellipse grid. Thus, the star could be parameterized (Table 7b). Later, a five-point irregular star was created in relation to the points on the arms of the six-point irregular star (Table 7c). Similarly, another five-point irregular star was formed in relation to the points on the arms of the six-point irregular star (Table 7d). When the second six-point irregular star was formed, the related points of previously formed other irregular stars were considered. Thus, when a star was parameterized, if there were other stars associated with that star, they were also parameterized at the same time (Table 7e). Later, halves of six-point irregular stars were formed at the edges of a quarter-slice part (Table 7f). The boundaries of the shape were then determined, and almonds were formed (Table 7g, h). Finally, the axes and grids were eliminated, and the created pattern was mirrored (Table 7i).

Table 7 Creation process of the muqarnas plan of the Atik Valide Mosque’s main gate in the Grasshopper programme

As stated in the above sections, muqarnas are traditionally formed by combining 3D elements. In this parametric muqarnas creation study, the method of forming muqarnas with such 3D elements was used. As an example, the method of modelling a triangle cell in Grasshopper is shown in Table 8.

Table 8 Creation of triangle cell

Variables

There are nine variables in the parameterization of the muqarnas plan in two dimensions. These are the value ranges of: the small radius of ellipses in the primary ellipse grid (V1); the large radius of ellipses in the primary ellipse grid (V2); the distance from the ellipse grid to the origin (V3); the distance from the points (close to the centre) on the second star to the origin (the first layer in a 3D representation) (V4); the distance from the points (away from the centre) on the second star to the origin (the first layer in a 3D representation) (V5); the distance from the secondary ellipse grid to the origin (V6); the angle of rotation of the hexagon in the six-point irregular star (V7); and the thickness of a biped cell (V8); as well as the proximity value of the points of a six-point star ornamental base to the centre (V9). When the minimum and maximum values of variables were determined, the maximum value range in which the muqarnas plan was not degraded or did not disintegrate was considered (Table 9). Table 10 shows the combination of variable values that results in the proportions of the analysed muqarnas at the main gate of the Atik Valide Mosque.

Table 9 The variables and value ranges for parametric muqarnas
Table 10 The combination of variable values that lead to the proportions of the muqarnas analysed at the main gate of the Atik Valide Mosque

In addition, various types of muqarnas formed by changing the variable values in 2D are shown in Table 11. For variables related to the ellipse grid, how the ellipse grid was parameterized in the background is indicated by the green colour. For example, two different muqarnas are shown for the first parameterization, where the values of V1 were 28 and 32 (while other variable values were kept constant). In the examples, only variables related to the muqarnas plan were changed. However, as Table 11 shows, when a 2D plan is parameterized, the 3D version of the muqarnas changes indirectly.

Table 11 Various types of muqarnas formed by changing the variable values affecting the 2D formation

There are seven variables in the parameterization of the muqarnas in three dimensions. These are the value ranges of: the height of layer 7 (V10); the height of layer 6 (V11); the height of layer 5 (V12); the height of layer 4 (V13); the height of layer 3 (V14); the height of layer 2 (V15); and the value range in the Z axis of a six-point star ornamental base (V16) (Table 9). The different types of muqarnas formed by changing these variables’ values are given in Table 12. For example, using parameterization 8, three different muqarnas were shown, where the corresponding values of V8 were 0, 6 and 14 while other variable values were kept constant.

Table 12 Various types of muqarnas formed by changing the variable values affecting the 3D formation

Conclusions

As a result of the design analysis of the muqarnas, it has been observed that there are two main elements in the composition: a five-point irregular star and a six-point irregular star. In addition, almond elements are used in parts other than five- and six-point irregular stars in the muqarnas plan composition (Fig. 9).

Fig. 9
figure 9

Elements in the muqarnas plan: a five- and six-point irregular stars; b almonds; c stars and almonds

In this study, the selected muqarnas plan was formed with a potential ellipse grid within the framework of shape grammars. As a result, irregular star polygons were automatically generated. This is the proof of the hypothesis put forward.

The most important feature of the muqarnas is their plans. These plans are produced based on geometric rules. Based on these plans, 3D elements of the muqarnas can be produced and combined by traditional methods to create muqarnas. Alternatively, again, muqarnas can be created from the plans using new techniques. For example, in this study a parametric muqarnas was obtained from the plan.

Within the framework of the shape grammar theory, muqarnas can be analysed through the codes. The latter help form parametric muqarnas. For example, it is possible to parameterize the geometric structure in the plan of muqarnas by creating it through the codes. Thus, different plan structures can be obtained, and muqarnas can be differentiated in 3D.

Using parametric muqarnas, different variations of muqarnas can be created easily and quickly. In addition, alternatives for unreadable portions of damaged historical muqarnas can be generated. Furthermore, the written parametric muqarnas script can be used and developed by other designers and researchers.

Today, there is a tendency to use traditional elements (such as muqarnas) in contemporary buildings in the Middle East. These elements, which have the potential to be developed with modern techniques, can present interesting ideas to the designers due to the underlying geometric compositions. Therefore, analysing how muqarnas were made in ancient times would be an important basis for new studies of muqarnas.