Parametric methods for constructing the Islamic ornament

The article discusses the method of algorithmic construction of Islamic ornaments, which can be used as a decorative element in architectural design. Two necessary stages are highlighted in the generation of an ornamental motif by means of algorithmic design – the first includes operations on a base mesh consisting of a combination of regular or semiregular cells, for example, drawing rays from the centers of the edges of the original lattice or rotating figures relative to its nodes; the second stage involves the creation of a basic pattern of the ornamental design that fits into a regular or semi-regular polygon, and the decorative motif in the figure is made up of a primitive that is symmetrically reflected relative to any lines, usually rays, emanating from opposite corners of the polygon. The paper analyses the traditional patterns of Islamic ornaments, on the basis of which new designs were built, using visual programming tools (Rhino and Grasshopper).


Introduction
Parametric multi-lay is undoubtedly one of the most promising design tools in architecture and design, which stands out for the formation of special, parametric thinking [1], for example, J. Harding even claims the formation of the concept of meta-parametric design [2]. Parametric multi-lay is addressed at all levels of urban planning, architectural and industrial design, for example, within the general theory of architectural composition [3,4], the formation of a new design methodology, R. Oxman [5,6], P. Bellew [7] J. Rees [8]. It also becomes popular in conceptual landscape projects [9,10], with a special focus on the bionic and biomimetic nature of design objects [11,12]. Parametric multi-lay is also applied to special objects, both in industrial design in general [13,14] and in graphic design and visual communications [15], in the design of temporary building structures [16], for example, membranes [17,18], pavilions [19,20], mosaics [21] using numerical methods of tessellation and visual programming. There is no doubt that Islamic ornament as an object of research is a multi-layered and multidimensional phenomenon of world culture [22]. At present, within the framework of modern ornamentalism, mathematical analysis and analytical geometry are used to reproduce many Islamic patterns, including Turkish [23,24], Moorish [25], and many others, based on traditional fractal construction techniques in the formation of geometric patterns [26,27]. In this article, we did not set the goal of a comprehensive study of it, and as the title of the article suggests, we were primarily interested in the algorithmic foundations of constructing an Islamic ornament [28], in particular the applicability of visual programming methods to such problems. As a hypothesis of the study, we assumed that the modern parametric ornament is the result of the fusion of digital technologies and architectural and artistic traditions [29]. Thus, a parametric ornament is a complex multifunctional system consisting of samples or patterns obeying numerical form finding algorithms, which are characterized by a regular distribution on a given surface, adapting to external changes and interacting with the environment. Thus, such a system, in addition to its decorative purpose, can carry various functional loads and have a wide scope of applications in architecture. The need for designers to form a holistic understanding of the theory and practice of modern ornaments predetermined a special approach to this problem and to its study, which considers the theoretical foundations, historical background and numerical methods for designing traditional ornaments [5]. There are two fundamentally different approaches to generating an ornamental motif in the framework of algorithmic design -the first includes operations on a base mesh, consisting of a combination of regular or semiregular cells, such as, for example, drawing rays from the centers of the edges of the original lattice or rotating figures relative to its nodes; the second approach involves the creation of a basic pattern template that fits into a regular or semi-regular polygon, traditionally a rectangle (often a golden rectangle) or a rhombus, representing the perimeter of a tile, and the motif itself in the figure is made up of a primitive that is symmetrically reflected relative to any lines ( usually rays emanating from opposite corners of the rectangle at 15 or 18 degrees). For example, the so-called Hankin method [29] can be referred to the first approach. In the second approach, the resulting motif is symmetrically displayed relative to the sides of the original figure, forming a continuous tile mosaic of the ornament.

Methods
The research methodology was based on the following methods: -visual programming methods (Grasshopper) for the algorithmic construction of Islamic ornaments; -tabular methods for setting geometric parameters of Islamic ornament based on Revit Architecture; -methods of system analysis for the classification of Islamic ornaments depending on the geometric parameters and their topology; -the historical and genetic method, which made it possible to trace the evolution of Islamic ornament in the historical aspect.

Traditional (manual) and parametric methods of constructing Islamic ornaments
The difference between the traditional compass-and-ruler construction and the parametric visual programming algorithms (Grasshopper) were examined by comparing the «traditional design» of Islamic ornaments using a basic hexagonal lattice pattern, and a modification of this scheme based on the so-called «circles of Apollonius», Apollonian gasket or Apollonian net. With this approach, the circles of the rosettes of the ornament get a variable size and fill the space of the transformed polygons without intersections, forming a characteristic base lattice for constructing the pattern. A variety of ornamental geometry based on this method was considered in the range from regular triangles to 16-gons. As the main geometric structure (girih), a 6-pointed star was used, which is obtained by rotating a regular triangle.
Basic pattern recognition. The main difference between manual compass-and-ruler geometry algorithms and visual design methods is the nature of the manipulation of data structures that define a geometric design or pattern. Thus, the main element of constructing an ornament using a compass and a ruler is the process of visually highlighting a certain «geometric pattern». This is a relatively simple and effective way, but every time we want to extend this sequence of actions to a different distribution with a different initial lattice and get a similar result, we need to reinvent the algorithm. With the second, automated approach (a computer-aided design system for ornaments or CAOD by analogy with CAD), using parametric methods for constructing patterns, there are great difficulties in manipulating the data of the original geometry, but at the same time we gain an important design advantagea large variability of the original pattern. In the traditional approach, the designer must «see» and visually highlight some pattern or regularity, so the computer program must also include elements of pattern recognition, which are used mainly for artificial intelligence (AI) tasks. Moreover, when performing the operations of transfer, multiplication, reflection, and other manipulations, the program operates with the internal structure of data represented in the computer memory in the form of lists and trees, especially when some geometric element of the future ornament rotates. The sequence of joining lines and their orientation for constructing polylines becomes fundamentally important, for which it is necessary to develop appropriate filters. Thus, already at the initial design stage, the algorithm is «overgrown» with a multitude of technically necessary nodes that make it hard to read. However, such a parametric approach, despite certain difficulties in its use, has a significant advantage, namely, algorithms created in the framework of visual programming have the so-called «generalization», that is, the possibility of automated application for certain typological groups of tasks. So, to build the Apollonius network, such standard components (or DLLs) of the Grasshopper plugin, such as «Circle Tan|Tan|Tan» (create a circle tangent to three curves, CircleTTT), «Shatter» (break the curve into segments) and «Curve|Curve» (define the intersection for two curves, CCX) were used, which allow you to change the base shape, filling with circles and polygons, and the geometric parameters of the ornament in real time. Comparing these two examples, we can conclude that in some cases the compass-and-ruler method can be more effective when creating templates that are simple in geometry. In this case, it is possible to construct elements of a traditional ornament in Rhino and transform it using algorithmic visual programming techniques in Grasshopper.

Parametric design methods and automated production of ornaments
In addition, algorithms for constructing a modern ornament should take into account the issues of tile manufacturing technology and its laying for various types of surfaces. If the traditional manufacturing methods meant tile contours that were simple in geometry (different for planes and dome coverings), then modern technologies of three-dimensional printing, digital processing on CNC machines, and a vacuum method for making molds for casting make it possible to use more complex forms of cutting surfaces (like Escher mosaics) for individual elements. When the purpose of the construction is a certain universality or greater variability of the pattern, then, despite the rather large time spent on the development of the algorithm, the parametric approach to the design of ornaments will undoubtedly have a greater generalization of the solution and, accordingly, attractiveness. For example, a pattern built on the basis of the Apollonius circles algorithm, inscribed in a regular hexagon, gives various options on a hexagonal lattice and for a combination of regular octagons and squares.

Basic lattice and ornament motif
When constructing a basic lattice, first of all, it is necessary to determine the geometry of an elementary cell, by turning, mirroring, or moving which, you can build a composite element that determines the motive of the future ornament, for example, eleven elementary Lave partitions, which can be used as a basis for the algorithmic construction of an Islamic ornament. At the same time, two approaches are possible when designing an ornament, firstly, it is possible to inscribe additional lines into the original elementary cell, which, when symmetrically mirroring, rotating or transferring, reproduce a certain decorative motif, which further spreads on the plane based on the «array» component (Arr), and secondly, you can use the base lattice, which is obtained by multiplying the unit cell, with the subsequent filling of the resulting grid with decorative elements, for example, rosettes. Architectural manuscripts show that Islamic artisans used base grids to create geometric Islamic patterns in Persia between the 10 th and 16 th centuries. Grasshopper has a complete set of tools for transforming the original geometry. At the same time, it is possible to transform both a separate initial polygon and all cells of the base lattice. When working with an array of base mesh cells, it becomes necessary to control their sequence, especially in the case of a combination of a large number of regular and semiregular polygons, which somewhat complicates the mechanism for transforming the mesh geometry. Trying to make the algorithm more generalized and suitable for a large number of polygon layout cases results in additional blocks or clusters of components designed to manage the geometry data structure. The main idea is to use one of the sectors of the described polygon in which a polyline is constructed that reproduces the outline of a star petal. To do this, from a vertically oriented polygon, one sector is selected within which points are set on the lines connecting the vertices and the center of the polygon using the «set a curve at a point with parameter t» (Eval) component, which has an input parameter (t = 0 ~ 1) to move points along straight lines. The required number of points allows you to draw a polyline through them, which is the basis for the geometry of the future ornament. The points are combined in a specific order into a List using the Weave component. Using this line as an axis, you can draw offset lines at a specific distance using the offset tool. Use the Join component to join individual lines to the polyline. The Boundary component is applied to fill the area between the edited offset polylines.
The Hankin Method or Contact Polygon Method, PIC was first formulated in the west by Hankin in the early twentieth century. In a series of works, he explains his discoveries and gives many examples of how this technique can be used. Scientists such as Lee and Crichlow [30] have relied on Hankin's «contact polygon» technique, which proposes the use of algorithms to transform ordinary tilings into an Islamic stellar model. Hankin's description of the technique provides an excellent starting point for an algorithmic approach. When creating such patterns, it is necessary to cover the surface, which should contain the ornament, with a mesh consisting of contacting polygons. Then, two lines are drawn through the center of each side of each polygon. These lines intersect with each other in the form of the letter X, and continue until they intersect other lines of similar origin. This simple rule completes the construction of the template. Considering the tiled partition according to Hankin's recipe, it can be noted that it has one degree of freedom, namely the angle formed by the growing rays of the motif from the point on the edge of the original pattern, from which they emanate. Kaplan calls this the contact angle [34]. A software implementation of these growing edges should take the tile and contact angle as input and try to grow the motif for that tile using the given contact angle. The use of visual programming tools often complicates the algorithm for constructing ornaments, which is primarily associated with the need to attract additional components for the correct organization of the data structure. To facilitate the modelling of ornamental geometries, individual fragments of the algorithm are collected in special clusters. This remark is equally true for both the Hankin [29] method and the Bonner [33] and Castera [32] methods, which deal with multi-scale and multilevel tiled partitions. By varying the angle of intersection of the pattern lines, Muslim artists have developed three historical families of Islamic geometric patterns: acute-angled, median, and obtuse. In the case of drawing a pattern on a dome-shaped surface to construct the corresponding segments, in addition to the need to transform the generated mosaic underlying the ornament with the curvature of an n-fold segment tapering to the vertex, it is necessary to apply the same basic geometric constraints to 3D structures that more or less control the creation of a two-dimensional pattern. Clearly, the application of geometric patterns to the surface of a sphere involves geometric conditions that have no parallels in a two-dimensional plane. This approach poses interesting geometric challenges for designers and artists, and at the same time opens up new aesthetic possibilities, despite the fact that there are few historical examples of such forms of domed ornament ( fig. 1). Fig. 1. The development of ornaments using algorithmic design tools is based on a variety of auxiliary operations related to the organization of the data structure and implies the creation of special clusters, which ensures the blockiness and hierarchy of the algorithm.

Three circles method
The simplest and most common way to construct star patterns for ornamental rosettes using algorithmic design tools is to construct three circles, and then divide them into equal parts to obtain 8, 10, 12, etc., N-angle stars, and by connecting the ends of intersecting lines constructed in this way with additional segments. Jean-Marc Castera's new pentagonal Persian patterning method [32] is an alternative approach to the well-known PIC theory (Hankin's method) ( fig. 2). Using a taxonomy of common Islamic motifs that can be inscribed in regular polygons, a complete set of periodic parametric designs can be created. Using Hankin's method, Kaplan develops a new style of Islamic design, which he calls «Islamic parquet deformation». The construction algorithm can be modified so that the contact angle of the outgoing ray changes along the line of the original mesh. The angle of contact of the rays is chosen depending on the horizontal and vertical position of the cells of the original partitioning lattice. Thus, the four beams leaving the predetermined contact position still form «X», even though the contact angle can vary within one tile. A smooth change in the angle of contact of the rays leads to a gradient changing geometric design, which, however, remains a recognizable Islamic ornament.

Tabular way of specifying geometric dependencies when constructing ornaments
Parametric tools of traditional three-dimensional design programs such as Revit Architecture, with a tabular form for defining constraints, also allow you to build models of transitive ornaments. The use of parametrics for creating an ornament within Revit Architecture implies the use of dependencies between the dimensions of elements in the table «Types in the family» based on the template «Typical metric model based on a sample». This method allows you to build an unlimited range of ornaments, for example, in the form of multilayer and volumetric geometries, with a variable size of the original pattern, with the nesting of adaptive elements, as well as using recursive algorithms. For clarity, the serial number of the template in the system is used as an independent variable in the model. To obtain more complex geometries, you can use the average distance between the template and a number of focuses as such a parameter. In this case, the location of the focal points will determine the geometry of the pattern and ornament as a whole. You can use curved shells as a starting surface for construction. In this case, it is necessary to take into account the ratio of the size of the original pattern and the curvature of the surface. The model also allows taking into account the physical parameters of the environment. For example, depending on the trajectory of the sun, you can set the parameters of the cross-section of the rods of the original element, which makes it possible to use the ornament as sun protection rails. Revit makes this kind of geometric construction easier by eliminating the need for a designer to write programming code. However, this does not mean that Revit does not have visual programming or scripting tools. Knowledge of Dynamo or Python scripts allows the user to obtain more flexible and complex ornamental geometries in a shorter time frame.

Methods for system analysis of Islamic ornaments
One of the methods used by Marc Pelletier [36] and Jean-Marc Castera [34] involves identifying historical archetypes, analyzing their construction, and using numerical methods in combination with modern computer software to create new patterns in the same style, but with three or more levels of recursion. This method provides samples that are new in their geometry, which share many qualities with their historical predecessors. Another modern method, described by Kaplan and Salezin [30], involves patterning in such a way as to avoid the limitations of plane-parallel tessellation, which implies the projection of Islamic patterns in Euclidean, spherical and hyperbolic spaces.
Hyperbolic patterns have also been explored by Dunham. The hyperbolic variation results in patterns with an infinite set of sizes of the main motive, which are distorted when presented on the Euclidean plane. The third line of pattern research is being pursued by Joe Bartholomew. He uses variations of the traditional girih mosaic technique, combined with scaling techniques of his own invention, in order to create ornamental art with undeformed patterns at different scales ( fig. 3).

Islamic ornament designs with patterns at different scales
The interplay of geometric structures at different scales is a feature of some of the major Islamic designs. These multiscale designs are usually found on buildings where there is a need to consistently perceive and read Islamic patterns as you approach them. At a distance, large-scale forms with high contrast dominate, but closer, they become too large to be perceived, and small forms begin to dominate. Early design methods for achieving this transition were fairly straightforward, often simply a matter of gradually filling the voids in the background with floral or plant curls to leave the design without empty space. Differences in size and level of detail were expressed using differences in density, thread depth, colour, and texture. Later projects are more ambitious and use the same style on multiple scales. An analytical survey of methodological practice based on polygonal technique reveals the historical development from simple geometry to structures of increasing complexity. Trained in formalized methodological practices, Muslim artisans expanded the ornamental tradition to include highly ingenious unsystematic patterns with many areas of local symmetry and systematic two-tiered designs with varying degrees of self-similarity. As geometric complexity increased, the ornamental construction techniques employed influenced the aesthetic repertoire available to artisans. Some of these practices can be seen as general normative rules, while others as local stylistic deviations from the general trend. Nevertheless, even those rules that are based on the geometric characteristics of the polygonal technique changed from time to time, and the main criterion that was applied above all others, was how much this ornamental design organically fit into the prevailing aesthetics of that time and place.

N-ray geometries in Islamic ornament
Modern designers usually limit themselves to copying traditional motifs or use software to create patterns stylistically reminiscent of the geometric girih ornament. To construct a starshaped rosette, each vertex of a regular n-polygon is connected to an m-vertex spaced from it on a circle clockwise. The star obtained in this way is designated as {n/m}. In this case, the points of intersection of the sides with each other are not considered as vertices. Such a star has n vertices and n sides, as well as a regular described n-gon. It is also called a star polygon and is the derived form of its corresponding n-gon. This paper sets out the main methods by which one can construct 3, 4, 5, 6, 8, and 10 ray patterns using visual programming methods. The most interesting are the designs of star-shaped sockets based on a combination of 7 and 9-petal models. Patterns of greater complexity can be created from the geometric design of the base lattice. Patterns of 12, 15, 16, and 20 star-shaped rosettes are fairly easy to reproduce, while the 14 and 18 end-star patterns can be made based on the geometric patterns for 7 and 9 gons. Certain difficulties arise when constructing 13 and 19-ray patterns due to the complexity of the geometry of the pattern that fills the areas between the rosettes ( fig. 4).

Conclusion
This work reveals the content of the concept of «parametric ornament» on the example of Islamic patterns and defines the basic requirements and principles of its design. As a result of this theoretical work, an original method for the numerical design of Islamic ornaments was developed, which is based on algorithmic modelling methods and uses historical patterns as the initial geometry for constructing decorative panels within the Grasshopper plugin. To develop a methodology for the numerical design of an ornament, an analysis of historical samples was carried out, which made it possible to identify the features of the geometry and the sequence of constructing Islamic patterns. The paper shows that the predesign analysis of historical samples is a necessary stage in the design of modern Islamic ornaments. The developed technique includes two main stages that must be performed when designing a parametric Islamic ornament -this is the construction of a basic lattice, which combines various polygons (each such combination corresponds to a certain historical pattern) and filling the lattice with various kinds of rosettes, mainly in the form of a star pattern. The article shows that the use of visual programming methods allows you to change the geometric parameters of the designed ornament, which results in an infinite number of variations of one decorative motif. The most effective method of making Islamic ornament is laser cutting, with the help of which the bulk of the patterns of Islamic ornament presented in the work were obtained using various materials from plastics to metal. The variability of the parametric ornament, embedded in the algorithmic modelling methodology, makes it possible to produce an almost unlimited number of various ornamental designs at the price of a typical model, many times replicated. The developed methodology demonstrates the wide possibilities of using Islamic ornament in various kinds of public buildings and complements modern approaches to the architectural and design patterns of enclosing structures. A variety of ornamental designs obtained in accordance with this technique can be used in real design, taking into account the regional characteristics of the architectural decor.