Application of the Fuzzy System for an Emotional Pattern Generator

: Nowadays, the end-user’s emotional engagement on commercial products has become more and more highlighted. Product developers’ and designers’ jobs are beyond the aesthetic face to new requirements that improve the user experience. One of the most important user demands is customization. Based on the new manufacturing technologies, there are some new opportunities to customize mass production output. Many automotive companies offer a wide variety of car components produced by request on the customers. The customization establishes the emotional engagement, but speciﬁc psychological background required to achieve it. This article deals with the scientiﬁc background of users’ emotions and geometric patterns (as an important feature of product customization). The related research covers the algorithmic generation of these patterns and soft computing control on this procedure. The method was developed based on fuzzy logic, which integrates the psychological aspects in the mathematical method.


Introduction
Studies have shown [1] that product customization is important to reach more customer satisfaction. For example, Deloitte found out that one out of five customers is willing to pay 20% more for a unique, personalized product [2]. This is why it has become a business strategy in many fields, from shoe design to vehicle features.
Besides the importance of customization, product designers should pay attention to many design methods and principles, such as the product life cycle, the sustainable material choice, the user experience, the practical and user-friendly design, and so on. This is why design education is about to face interdisciplinary challenges [3], where the continuous support and development are necessary.
There is no single rule of successful design; however, there are some fascinating facts about the most successful products, which could show that, besides many factors, the beauty and harmony have a massive impact on us, as Donald Norman said: "Attractive things work better" [4]. Other studies [5] also show that the factor of beauty is an essential criterion of the quality of design; furthermore, for instance, Samsung CEO Yun Jong Yong claims that: "Good design is the most important way to differentiate ourselves from our competitors" [6].
In the past few decades, many branches of product design examined and utilized emotions. One of the first was the Kansei engineering which was invented by Mitsuo Nagamachi in the Studies have proved that emotions that affect users play a significant role in decision-making and information processing. Furthermore, studies [10,11] have shown that, although a product has aesthetic, symbolic, functional, ergonomic, etc. value, aesthetic, and symbolic values are the most important for customers. Other studies [12] claim that the user experience has three levels: aesthetic pleasure, emotional response, and symbolic meaning. Examining the symbolic meaning is especially important for different design tasks because, in general, communication between the generations is-besides the common language-based on some strong points, and these could be tradition, culture, or community knowledge. The Swiss psychologist and psychiatrist Carl Gustav Jung (1875Jung ( -1961, who founded analytic psychology, believes that these important elements are symbols. This symbolic mentality, topology, and drawn symbols are indispensable tools for humanity [13,14]. Since it is known that all products affect the emotions of the user (emotionally neutral products do not exist), examining the relationship between design and emotion has become particularly important in several areas, including the field of marketing, engineering design, psychology, social science, and so on. Because of the importance of user experience, tools, methods, and models are being developed for the "design for emotion" approach [15].
The motivation of this study is to provide a solution for the three above mentioned difficulties: the importance of customization, the interdisciplinary knowledge of designers, and the role of emotion in the design. The goal of this research is to examine the connection between appearance and emotions in order to help product designers during the design process. The assumption is that, with the help of the results of this study, designers could create a more aesthetically pleasing design with the focus on geometries, shapes, and patterns on the surface of a product. The consumers' perceived appearance attributes (modernity, simplicity, unity, etc.) have physical properties (such as color, shape, texture, contrast, symmetry) [16].  This research is dealing with geometric patterns because, according to literature studies, it can be seen that, while many industries are about to use patterns as an aesthetic feature on a product, only a few of them (for instance, textile industry [17]) use patterns according to their effect on human emotions. For example, in the field of interior decoration [18], jewelry patterns [19], package design [20], textile, and clothing industry [21] research are patterns on products; however, they do not connect them to emotions.
In this study, during the pattern development process, only monochrome appearances are applied for patterns, since the technology and the application area which was chosen require only the depth of the pattern. This is why the examination of colors is not part of this paper.
The goal is to create patterns based on user preferences. This is why not only a pattern development algorithm is necessary but also investigations, where it was possible to gain information about the consumer's feeling of these patterns.
In order to develop an automated pattern generator software, it is essential to examine the existing programs. Pattern generators are used, for example, in web design where the user could create 2D geometric or abstract patterns, or it was also developed in the field of fashion in order to design garments [22], and in architectural design to generate Islamic star patterns [23]. These patterns are mainly working for a specific purpose and textures, but there is no solution to develop general patterns with significant variable elements, and they are not connected to emotions. Because of this lack, the purpose of this study is considered to be appropriate. A collection of a few outputs and interfaces of available pattern generators can be seen in Figure 3.
Since the existing applications are not capable of 3D projection, a new mathematical method was created for that, which is used in this experimental code called EmPatGen.
EmPatGen means Emotional Pattern Generator that creates connections between emotions and geometries. It is an automated pattern development method where the consumers can give emotions and feelings as input parameters and it generates 2D patterns as DXF outputs. The goal is to use this code in the automotive industry, since nowadays, in the automotive industry, the emotion-driven design and the exploration of consumer's specific needs are becoming more and more important [24], which very much fit this goal. The application area of this research is the surface of car interior trim elements. The aim of this system is to help designers create the most aesthetically-pleasing pattern according to the given preferences, applying a new scientific method that connects aesthetic contributions to geometries. Through this software, it is possible to create a unique car interior design that meets the nowadays more important customizing consumer needs. Furthermore, when this system reaches its final form, it would be easily used in the car dealership, where the consumer could provide his preferences, and, this way, the user experience could be increased as well. Figure 4 explains the steps from the selection of preferences until the final product.  In the mathematical method, it is essential to handle human factors, and it should understand soft borders as well. Because of these requirements, fuzzy logic was applied for this study. Fuzzy logic is one of the best ways to handle human emotions, which was demonstrated in many studies [25][26][27].
There is no other known solution for transferring emotions to geometric patterns by the usage of fuzzy logic, which is why the contribution of this research is novel.
The following sections present the background of pattern generator and the details of the fuzzy system.

Pattern Generator
The experimental code generates patterns according to the input parameters that are emotions and feelings. The Pattern Generator has two main parts, the Basic geometry function and the Pattern space function, since the focus group interviews and survey results have shown that both the basic geometry and pattern space have an impact on the consumers. The Basic geometry function determines the basic shape size, orientation, and so on, while the Pattern space function modifies the path of the spreading of the pattern. Other studies [28] are also dealing with the spreading of pattern; however, EmPatGen has a different method that is introduced in the following phases.

Basic Geometry Function
The Islamic geometric patterns are based on polygons. It can be hexagon or octagon, but they also use star polygons and rosette [29,30]. Figure 5 shows a few types of Islamic geometric patterns. In this research, only constructive polygons (such as hexagon, octagon, and decagon) were used. By using polygons, there is a good opportunity to create simple ones with sharp corners (such as triangles, squares, rectangles, and pentagons) and round like variants (such as regular polygons with more than 30 corners). Modifying the ratio of the outer circle proposes a new way of controlling the shape of the basic geometric elements. If we distort a regular circle into an ellipse, the included square becomes a rectangle. We have smooth control over the geometry by modification of the following parameters: x, y, r, e, n, rot, solid, and width. Table 1 shows the explanation of these parameters. The parameters 'x' and 'y' represent the center of the outer circle. Via these parameters, the basic geometry can be placed at the required position in the design space. The parameter 'r' stores the radius of the outer circle. The basic geometry size is determined by the outer circle's radius. The elliptic parameter ('e') is used for non-uniform scaling of the shape. This parameter is calculated as the ratio of the smaller and larger radius of the outer ellipse. In the case of where the parameter value is larger than 1, the vertical radius of the ellipse is larger than the horizontal one. The parameter 'n' informs about the sizes of the polygon. If this number is larger than 8, the shape is considered to be a circle or an ellipse depending on the value of distortion (e). The relative rotation ('rot') means a rotation that always stops at the corner or an edge of the geometry. The value of this parameter is changing between 0 and 0.5. At 0 value, the polygon stands on its corner, at value 0.5, it is laid on one of its sides. The 'solid' parameter indicates the filling status of the basic shape. The 'width' parameter controls the thickness of the contour line.

Pattern Space Function
Other studies [31] also examined the spreading of patterns, and basic geometry and pattern space can be seen as well. For example, in Figure 6, a segment of a hexagon is the basic geometry, and it is repeated inside of the hexagon (BASE). The spreading based on the hexagonal domain means that the pattern is developing hexagon to hexagon. In EmPatGen, the method is that the basic shape is as simple as possible and the spreading can be general, during which the setting of the pattern space vector defines the pattern [32]. In this way, the counting process can be reduced and, with this general algorithm, it is possible to reach more variables of patterns. Moreover, it is easy to evoke the dynamic effect. In other research [33], they create a more complex basic geometry. For example, in the case of Figure 7, they define the highlighted shape, which is quite complex geometry.
In EmPatGen, the pattern vector based on shifted paths (waves), which determine the position of basic shape's centers. Other elements of pattern space vector control the distribution and shape of these basic members. Thus, in the case of Figure 7, in EmPatGen, the basic shape would be a simple square, and, with parameters, it is easy to allocate it and reduce the size of it, which is a much easier way to create this pattern.
'Ypos' is an internal parameter that positions the middle y value of wave (path) in pattern space. Parameter 'A' is the amplitude of these symmetric waves. Parameter 'n' specifies the number of displayed waves. When the 'dsp' parameter is equal to 1, the path of the pattern becomes visible. Parameter 'dRng' defines a dynamic range of patterns. The value of this parameter indicates the number of varying basic shapes. If we add 1 to this number, it shows the number of that element, which has the same shape as the first one in the pattern row. By varying the 'dSft' parameter, the pattern space shows waving visible attributes. Altering the 'dScU' parameter, the overall size of basic geometry is increasing or decreasing in a uniform way. Applying the 'dSnU' parameter, the change in overall size might be non-uniform. 'dRot' is a relative value between 0 and 1 (1 represents the rotational symmetry, 0.5 rotates the basic polygon onto its side). 'VStS' is a constant value in EmPatGen; however, the other parameters are variable. The meaning of the attributions of basic geometry and pattern space is illustrated in Figure 8.  Table 2 presents the parameters of the pattern space functions of EmPatGen. The distance between the rows of the pattern

Fuzzy System of EmPatGen
Human reasoning and some other phenomena cannot be accurately described by two-valued logic. This idea led L. A. Zadeh to the creation of fuzzy logic [34]. Fuzzy logic is an extension of the classical two-valued logic, hence, in fuzzy logic, the conditions can be not only true or false, but it is also possible to provide values between them. In the same way, the fuzzy set theory is an extension of the classical set theory [35,36]. In the fuzzy set theory, an element can belong to a fuzzy set by a membership value. Figure 9 depicts this situation by providing a graphical representation of a standard set (crisp set) and a fuzzy set. Fuzzy logic is able to handle numerical data and linguistic knowledge at the same time [37,38]. Thus, fuzzy logic was used in order to connect the attributes of geometry and emotions.  Figure 10 shows the generic structure of a fuzzy system. Basically, it has input data, a fuzzy rule base, an inference mechanism, and output data. The fuzzification and the defuzzification actions mean the transformation of crisp to fuzzy and fuzzy to crisp data [39].
The fuzzy rule base contains fuzzy rules. The general form of a fuzzy rule with one input and one output dimension is as follows: R: If x is A, then y is B, where x ∈ X is the input and y ∈ Y is the output variable, X is the universe of discourse for the input and Y is the universe of discourse for the output variable, and A and B are linguistic labels that are expressed by fuzzy sets. Fuzzy set A is the antecedent while fuzzy set B is the consequent of rule R. The general form of a fuzzy rule with multiple inputs and one output dimension can be written in the following, so called Mamdani-form [40].
R: If x 1 is A 1 and . . . and x n is A n then y is B, where x = (x 1 , . . . , x n ) is the input vector, x j ∈ X j , X = X 1 × . . . × X n is the n-dimensional universe, A = (A 1 , . . . , A n ) is the antecedent vector, y ∈ Y is the output variable, Y is the universe for the output, and B is the consequent set. Figure 10. Generic structure of a fuzzy system.
The fuzzy system works as follows. The inference mechanism compares the given observation with the antecedent parts of the fuzzy rules in the fuzzy rule base. Based on these comparisons, it will be known what the degree of matching of each rule will be for the observation. These degrees are used by the inference mechanism when taking into account the consequent parts of the fuzzy rules. In the case of Mamdani inference [40], each rule's consequent fuzzy set is cut by using the rule's degree of matching providing a sub-conclusion for the rule. The conclusion of the given observation for the whole rule base can be computed by taking the union of the previously calculated sub-conclusions. This conclusion is a fuzzy set; however, in most of the cases, the expected conclusion is not a fuzzy set, but a crisp value. Hence, the crisp value needs to be determined, which describes the conclusion fuzzy set in the best way. This procedure is called defuzzification.
The application of the method in the present task is appropriate, as other researchers have also successfully applied fuzzy logic to link mathematics and art [41]. Nevertheless, while it was used there to shape geometries, in this system, the pattern is formed by emotion-based inputs.
For our task, the following structure is used. The three inputs of the fuzzy system are the dynamics, style, orientation; the 11 outputs cover the four basic geometry and seven pattern space variables. The fuzzy rule base contains eight rules created to cover all ranges of the inputs. The following subsections explain the details of this structure.

Input and Output Fuzzy Membership Functions
In EmPatGen, all of the inputs can be rated from 1 to 10. In dynamic input 1 is elegant, 10 is sporty, in style input 1 is classic and 10 is youthful, in orientation input, 1 is feminine and 10 is masculine. For the type of functions, triangular membership functions were applied. Figure 11 shows the "Style" membership function. "Dynamic" and "Orientation" input was created by the same method. For the output membership function, trapezoidal and triangular functions were used. All of the parameters have a low, medium, and large function. If we examine the basic shape size (which was determined by the outer circle of the shape), a rate between 0 and 1.5 was created, where 0 is small, from 0.5 to 1, the shape has a medium size, and 1.5 is considered to be large. Further figures can also be seen in Figure 12.  Figure 13 shows the Mamdani inference system with crisp inputs. Figure 14 shows what the situation is when a value is given for the system. In this example, Dynamic: 10, Stype: 10, Orientation: 4. In this particular case, two rules are active since an AND connection works in the fuzzy system. It means that the rule will work if all the membership functions are applied. If we observe the orientation input, it can be seen that there are values only under the intersection of a red line (at the input value) and the membership function. In the Mamdani control algorithm that was used, the lowest value is taken over by the output membership function. The area below the membership functions is summarized in the bottom line. Then, it compares the active membership functions and takes the highest value.  The defuzzification is a bisector type, which means that the red lines of the last row of Figure 14 cut in half the area under the function. There are many types of defuzzification methods, and Figure 15 shows some of them graphically.

Results of EmPatGen
The result of EmPatGen is a 2D pattern. It is possible to create many types of patterns, and, as an example, in Figure 16, you can see a few of them created by this system with relevant values.
If we consider the different data of Figure 16-which rows are highlighted-the operation of EmPatGen is understandable. The number of sides of the shape in the case of the first pattern is 36, which seems like a circle. The other pattern has three-sided shapes, triangles. The first pattern has a dynamic attribution of scaling, and the second has rotation. The dRng provides how many members are affected by the dynamic attributions.
Although there are research studies where it is possible to place pattern on spherical, Euclidean, and hyperbolic geometries [42], in this research, the goal was to find a solution for placing the output on free form geometries as well. This is why EmPatGen provides DXF file from the pattern. With the help of laser texturing technology, the DXF pattern can put on the surface of the interior car trim pieces. Figure 17 presents an example where a pattern is placed on a free form geometry.

Validation
Previously, similarly to other studies [43], mainly questionnaire-based techniques were applied in order to investigate the emotions, however, during this validation, the applied technology was an Eye-tracking software (Tobii Studio) and hardware (Tobii T120 monitor). Researchers also have proved the successful usage of this technique [44]. The examination was held in the Budapest University of Technology and Economics on the Department of Ergonomics and Psychology. Figure 18 presents the examination flow of this test. Firstly, a short questionnaire was applied that contained the following question-areas: gender, age, level of education, time of driving license possession, driving habits, etc. Secondly, in order to measure the gaze position and understand human behavior in this research, eye-tracking technology was used. In this series of experiments, 33 participants were involved, and, in total, eight tasks were accomplished by eye-tracking examination. Finally, in a short interview, participants were asked about their opinion and inner motivation during the selection process in the eye-tracking tasks. In total, 33 people participated in this examination. From these, 60% were men, and 40% were women. In addition, 80% of the participants had graduated from university. The average age was 37.5 years old (standard deviation = 15.18), the youngest participant was 19, and the oldest 79 years old. In addition, 85% had a driver's license, and 37% used it every day.
The questionnaire revealed that on the 1 to 4 Likert-scale, participants like cars at an average of 3.34 (standard deviation = 0.70) and were open to arts at an average of 3.37 (standard deviation = 0.79). In their opinion, pureness, harmony, color, excellent material quality, comfort, design, and clarity were the most important aesthetic features of the inside of a car. Besides these, participants also referred to the importance of specific car interior elements, such as dashboard, seats, steering wheel, which areas were the most appropriate for the usage of this system.
The eye-tracking software follows the eye of the tester and creates a video record from the eye movement [45]. This is why decision-making tasks were created as can be seen in Figure 19. With the help of the software, it is possible to detect the thinking process of the user as well, and it provides more data for us besides the final decision.
In the questions, characters were supposed to personalize the mood, for instance Sporty-Youthful-Feminine, or Elegant-Classic-Feminine. This idea came from a practice of design thinking called "persona" which is a modeling tool of human-centered design and is used mainly in the ideation phase of design [46]. The persona is a hypothetical archetype of real users [47] that expresses a specific user need with the information of their name, age, hobbies, etc. In Figure 20, an example can be seen, which was the 6th task of this experiment. In this question, a character called Vilmos was supposed to personalize the Elegant-Classic-Masculine mood. In the same way, all other questions had a personalized character as well, each of them appearing two times. There was a character for Sporty-Youthful-Feminine, Elegant-Classic-Feminine, and Sporty-Youthful-Masculine as well.
The question was the same in all of the tasks: "For wrapping a present for the described person on the side, what type of pattern would you choose?" After that, nine patterns were shown, and the people had to select one of them.
With this eye-tracking research experiment, it is possible to see that the expected outcome of a specific input set of EmPatGen is the same as the participants-selected pattern from the 9 pieces' palette. The validation process confirmed the hypothesis of the research fundamentally; however, the software code should be modified according to the results.
It turned out that the people do not necessarily pick the pattern that they examined for the longest time. For the reason of applying statistical tools to identify the areas that were really of most interest to the subjects, each pattern indicated an area of interest (AOI) of the eye-tracking technology, which is shown in Figure 21. The colorful areas represent the AOI for each pattern. It is possible to retrieve the number of fixations for them as an indicator of the pattern's subjective importance.  The maximum values for the Fixation Count fell on the fifth pattern seven times out of the eight cases, which may mean that the middle pattern was used as a starting point and moved from there to examine the other patterns. Therefore, the fixation started and arrived there. The Kolmogorov-Smirnov test showed that fixation values do not follow a normal distribution in either case; this is why the Wilcoxon test (Table 3) can be used to determine patterns that were significantly more interesting for participants than the others. From the results of the comparison, it can be seen that a significant difference compared to the middle pattern occurred in the AOI areas of 4, 7, 8, and 9. This is why, in the case of this task, the 1, 2, 3, 5, and 6 patterns were significantly more important compared to the others. Twenty-four participants chose from these patterns, and, for this task, the expected result (pattern 2) was chosen most of the time, and 7 participants chose that out of 33 subjects. The evaluation of the results can be accomplished for other tasks as well. As Table 4 shows, out of the eight tasks, the expected outcome fell into the most interesting cases five times (bold numbers in the "Expected Outcome" row), and two times, the expected outcome was the same as the most popular pattern (bold numbers in the "The most selected pattern" row). Moreover, the results have shown that feminine factors have a more significant impact on people; this is why the model should be modified. If the Feminine input values weight is multiplied by three, the expected pattern shifts much closer to the position of the most interesting pattern, called "modified expected outcome" in Table 5. Out of eight tasks, the expected pattern fell into the most interesting patterns seven times, and, three times, the expected pattern was the same as the most chosen one.

Conclusions
This research is dealing with relations of patterns and emotions in order to use this information on car interior trim elements. The development of geometric patterns starts with input parameters that present the required feeling, emotions (such as elegant, sporty, youthful, etc.) given by the consumers. The EmPatGen software generated patterns according to the given preferences in order to build the most aesthetically-pleasing car interior, and, with this, it is possible to help designers.
In the near future, the goal is to extend this system's usage to other fields as well, for instance, to robotics. The further study of the pattern generator will be wide. Among others, the main direction of development would be the evolution of pattern appearance from static to dynamic.

Conflicts of Interest:
The authors declare no conflict of interest.