From Form to Content: Using Shape Grammars for Image Visualization∗ Xiu Wu Huang, Cheryl Kolak Dudek, Lydia Sharman, and Fred E Szabo Concordia University, Montreal, Canada
[email protected],
[email protected],
[email protected],
[email protected] 1 March 2005
Abstract The idea of superimposing geometric grids on images to visualize their content is not new. Leonardo Da Vinci used it, D¨urer used it, and Descartes pioneered the use of geometric grids to describe geometric content with algebraic equations. Shape grammars take the algebraic analysis of images to a new dynamic level. They permit the visualization of images in terms of construction processes: generators and relations, in the language of algebra. In this paper, we discuss some of the creativity involved in the identification of initial objects and rules for the analysis of both a Zillij mosaic and a Kuba cloth. We show that although conceptually similar, the processes are quite different for the two types of design. While Zillij mosaics are regular, Kuba cloths also involve scaling: the variation of the size of repeated sub-patterns within a defined space. Keywords— Design, image template, Kuba cloths, Mathematica function, shape grammar, shape-grammar form, shape-grammar rule, visualization, Zillij mosaics
1
ization of the geometric content of the given images. The focus of our research is to develop a single, computationally powerful method for analyzing both symmetric patterns in ancient in cultural artifacts, such as those in the 16th-century Zillij mosaics, as well as the asymmetrical ones obtained from symmetric patterns by geometric improvisation, such as those in African Kuba cloths. This approach has the advantage over traditional methods of providing a uniform analytical approach to pattern analysis, independent of the presence of symmetry. Our work on symmetric patterns using shape grammars is only the starting point of our research and validates our method. The process of writing shape grammars to describe the underlying geometric forms of a set of artifacts can be compared to that of axiomatizing a set of mathematical structures. The process is both creative and non-routine and the formal description is not unique. Expert knowledge is required at the initial steps. The following tables juxtaposes the corresponding notions:
Introduction
In this paper, we introduce the idea of a shape grammar form, a geometric design generated by a shape grammar that reveals aspects of the underlying geometric content of an image. We give two examples: one for a Zillij mosaic (chosen because of its geometric regularity), and one for a Kuba cloth (chosen because it involves the additional ideas of scaling and geometric improvisation). While the shape grammars derived from specific images almost never provide a tool for the exact reconstruction of the images for which they were built, some of the patterns constructed with these grammars can always be superimposed on the initial images and act as templates to facilitate the visual-
Shape Grammars Initial shapes Construction rules Shape grammar forms Shape grammar functions
⇔ ⇔ ⇔ ⇔ ⇔
Formal Systems Formal axioms Rules of inference Formal proofs Theorem provers
Table 1: Shape Grammars versus Formal Systems The use of formal systems as a visualization technique is not new. In Szabo for example, formal proofs, as treestructures, are used to visualize the results of the composition of canonical functions between sets of mathematical objects obtained by generalizing sets of vector spaces.
∗ The research in this paper is supported in part by grants from the Social Sciences and Humanities Research Council of Canada, the Fonds qu´ eb´equois de la recherche sur la soci´et´e et la culture, and the Hexagram Institute for Research and Creation in Media Arts and Technology.
Proceedings of the Ninth International Conference on Information Visualisation (IV’05) 1550-6037/05 $20.00 © 2005 IEEE
2
Forms for Zillij Mosaics
The Zillij mosaic pattern used in this paper is from a 14th century wall panel located in the Madrassa Bunaniya (religious school) in the Medina in Fez, Morocco. The mosaics are glazed ceramic and the technique for creating the subtle and complex patterns are passed down, principally by the eldest son, through the men of the families that are responsible for the survival of the craft.
squares and the creation of the short pointed star. The remaining images on the left side are three single forms. On the right side the function that is applied to these forms to create the pattern is shown. Each form is rotated eight times, equidistant around a circle. Two of the forms have a simple rotation while the third requires rotation and mirror reflection. Zillij mosaic patterns are usually created using six, eight or ten fold symmetry. Each of these geometries produces patterns requiring different forms. Within each of the geometries there is a wide variety of patterns, although some of the forms can be used for different patterns when the governing geometry is the same.
Figure 1: A Sample Zillij Mosaic (Photo: Sharman 1994) This example is made up of nine different discrete shapes surrounded by mosaic strips that form woven ribbons which are found in the early examples of zillij mosaics. More recent and contemporary examples are usually made up of the discrete forms without this weaving.
3
Visualizing Zillij Mosaics with Forms
The components of the shape grammar form in Figure 2, are eight of those found in the zillij panel plus a square. The ninth form in the panel is created by overlapping two squares of the same size rotated by 90 degrees (Figure 3) to create a star with eight short points. It is from this star that the pattern radiates with its eight fold rotational symmetry. The eight forms are all derived from the star, with some additional steps before the forms can be identified. By folding in every other point of the star inwards, a cross is formed which tessellates with the eight-pointed star. It is from the combined cross and star that some of the forms can be extracted. Others are extracted by extending the lines of the short pointed star to make a star with eight long points (see Sharman [13] and Hedgecoe [5]). However, the scale of these basic shapes varies extensively when creating the final zillij pieces. The top four images in Figure 3 explain the overlapping
Figure 2: Zillij Grammar Shape Palette The shape grammar palette in Figure 2, is a partial list of the basic shapes from which visualization forms can be built. The shapes are not unique. It is very likely that designers and geometers have different starting points and their choice of initial shapes may therefore not be the same. These choices then impact on the sets of construction rules required to build the grammars. The process is again analogous to that in the theory of formal proofs where there is often a choice between many formal axioms and few rules of inference versus few formal axioms and many rules of inference. We again refer to Szabo [14] for an illustration of this point. By choosing a small number of axioms and many rules, formal proofs can sometimes be construction that contain no detours. In the case of shape grammars, this would correspond to having shape grammars without an eraser function. The shape grammars discussed in this paper have this property. For visualization purposes, this property is desirable since the constructed forms involve no loss of information. In Examples 3, for example, we show a Zillij form which is Mathematica-generated without erasures. So is
Proceedings of the Ninth International Conference on Information Visualisation (IV’05) 1550-6037/05 $20.00 © 2005 IEEE
the Kuba shape in Example 5. By contrast, some of the designs in Knight’s book on Transformations in Design (see [6]), definitely involve a loss of information in the application of rules of some grammars discussed in the book. Among the goals of our research is to explore the existence of shape grammars for classes of images which have what we might call the subform property, i.e., the property that they can be visualized using shape grammar forms built without erasures. In proof theory, the analogue of this property is known as the subformula property, where proofs of theorems can be constructed by using only the subformulas of the formula to be proved. The search for axiomatic descriptions of sets of theorems with the subformula property is central to the study of proofs. Finding shape grammars for sets of images with the subform property is one of the goals of this research.
be built. The next two examples give an indication of how this can be done. Example 1 Generating Two Zillij Forms Using the Rotations package of Mathematica, we can easily generate the following Zillij form:
Figure 4: A Mathematica-Generated Zillij Form
Example 2 A Mathematica Implementation The Mathematica function used to apply and iterate the Zillij rule shown in Figure X is defined using basic tools built into the Rotations package:
Figure 3: A Zillij-Grammar Rule Palette
3.1
Using Mathematica for Generative Design
While the identification of basic geometric shapes in artifacts is an interpretive artistic endeavor, the production of shape grammar forms for studying the geometric content of such artifacts can be partially automated using appropriate graphical software. The Mathematica computation system is particularly well suited to this task. Its extensive visualization features provide an elegant environment for generating shape grammar forms. Mathematica contains extensive geometric tools for the implementation of Zillij shape grammars. It supports affine transformations for the definition of a wide variety of space-filling patterns. Moreover, Artlandia, a Mathematica add-on, makes it possible to generate a large class of geometric patterns from which shape grammar forms can