Journal of Robotics, Networking and Artificial Life
Vol. 8(2); September (2021), pp. 117–121
DOI: https://doi.org/10.2991/jrnal.k.210713.010; ISSN 2405-9021; eISSN 2352-6386
https://www.atlantis-press.com/journals/jrnal

Research Article

Development of EEG Data-driven Generative Art Application
for Real-time and Dynamic Interaction
Chien-Tung Lin1, R.P.C. Janaka Rajapakse1,*, Yoshimasa Tokuyama2
Graduate Institute of Animation and Film Art, Tainan National University of the Arts, No. 66, Daqi, Guantian Dist., Tainan City 72045, Taiwan
Department of Media and Image Technology, Tokyo Polytechnic University, 1583, Iiyama, Kanagawa 243-0297, Japan

12ARTICLE INFOABSTRACT

Article History

Generative art is produced by procedural techniques. It has obtained a lot of attention since the beginning of computer graphics.
Many works of art are inspired by nature, among which phyllotaxis is as well. It is a combination of mathematics and the beautyof nature. Not only can it be seen everywhere in nature, but also often appear in man-made objects, becoming part of culture
or religion. This paper presents the development of an interactive generative art application that is created from a phyllotaxis
pattern by using the user’s Electroencephalogram (EEG) data. When people are using it, it will allow them to more easily relax
and achieve the function of art therapy. We tried to use EEG data to make an interactive installation art that creates phyllotaxis
patterns that are projected on the wall. Everyone has a different state, the generated patterns are also different from person toperson, which creates interesting interactive contents. In addition, sound can also be changed by EEG data to become dynamic
and real-time contents.

Received 04 December 2020
Accepted 07 May 2021
Keywords
EEG
phyllotaxis
generative art
interactive art
installation art© 2021 The Authors. Published by Atlantis Press International B.V.
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

1. INTRODUCTION
With the development of microcomputers and single chips, theway people interact with computers has changed. It has come along way from the early keyboard and mouse to the developmentof the multi-touch. Developers always want to find better ways
to let people interact with apps in a more natural way, such as
through gestures (Leap Motion [1]), Wii [2], voice input, etc.
However, these are all motor functions, that is, different peopleusing the same operation method will get the same result.
Compared with Electroencephalogram (EEG), because people
cannot see how the user moves, it just exists in the brain’s operation, so no one can copy the actions of another person andproduce a personal style. Therefore, we aim at the state of concentration and meditation in the brain waves as an interactive input
method to bring a new perspective.
In addition, installation art is becoming more and more popular as
a form of modern art. Compared with other art forms, installation
art allows people to be more involved, use touch, and even play in it.
Therefore, interactive methods are also added to allow people to enjoy,
participate in, communicate, and interact with art, making it truly
interactive installation art. However, most of the art content is fixed
or arranged according to the creator. So, there is not much change,
resulting in people not wanting to repeat, come, and participate.
Generative art is produced by computer programs. It has the characteristics of non-repetition and endless evolution. It has received

Corresponding author. Email: janakaraja@gmail.com*a lot of attention since the beginning of computer graphics. Many
works of art are inspired by nature, among which phyllotaxis isincluded. It is a combination of mathematics and the beauty ofnature. Not only can it be seen everywhere in nature, but also often
appear in man-made objects, becoming part of culture or religion.
For example, Mandala Kolam is not only an expression of art but
also healing people’s bodies and minds. And Chakra’s representative totem is also like phyllotaxis. When people are using it, it iseasier to relax the mood and achieve the function of art therapy.
Therefore, we try to use EEG to make interactive installation art
and use EEG input to create phyllotaxis patterns to project it on
the wall. Because everyone has a different state, the graphics drawn
are also different from person to person, creating interesting interactive works. In addition, the sound can also be changed by EEG,becoming a dynamic, real time content.
Finally, when the user looks at the graphics generated by his own
brain, the visual and sound effects of these graphics can trigger
psychological states to achieve an increasingly relaxed state, andachieve the effect of meditation. This can bring about communication with the heart and then achieve the effect of art therapy [3].

2. BACKGROUND: EEG CONTROL ART
2.1. The Use of EEG in Art
Since 1965, the use of EEG in artistic creation has been documented. Most of the content has an established pattern. Authors orusers use their brains or mental states as artistic creations, such as

C.-T. Lin et al. / Journal of Robotics, Networking and Artificial Life 8(2) 117–121

118

focusing or relaxing to control sound and images [4]. That is active
input agency.
There are three agencies for the Brain–Computer Interfaces (BCI).
The active input agency, the reactive input agency, and the passive
input agency. The reactive input agency is that the user’s brain
activity is changed by an external stimulus. Therefore, the trainingis needed for these two kinds of BCI [4].

2.2. Passive Input Agency and Aesthetics
Unlike the active input, the passive input agency does not require
the participants to do special things with EEG as artistic creation. It
uses the mental and emotional state of the author or participant toproduce changes in sound and images, especially music that affects
the emotional changes of the user. The changing screen is synchronized with the music [5]. In this application, the sound is also
generated from the real-time EEG data which makes it easier forparticipants to immerse themselves in an atmosphere of discord.
However, this application goes beyond this way of expression andfocuses more on the communication between the self and the heart.
Through the displayed graphics and sounds to perceive and explore
one’s mental state, we can better open up internal communicationand dialogue to achieve relaxation and meditation. This allows for
self-reflection, and ultimately the opportunity to achieve the goalof art therapy.

Figure 2 | System structure.

abc

Figure 3 | Generating phyllotactic patterns from the Vogel’s formula.
(a) a = 137.3°, (b) a = 137.5°, (c) a = 137.6°.

3.2. Content Generation

3. DEVELOPMENT AND APPLICATIONThe simple model for the florets of a sunflower was Vogel ‘s formula. As the book “The Algorithmic Beauty of Plants” [9] descript
below:

3.1. System Structure		 j = n * 137.5°, r = c n , The development environment is Intel I7 PC on windows 10system, with the NVIDIA GeForce RTX 2080TI graphics card. The
programming language C# has been used to develop the application on the Unity SDK. The EEG headset is NeuroSky MindWaveMobile 2.

• n is the ordering index number of a floret, from the center toouter. Therefore, it is accumulated from the minimum value tothe maximum value in the program.
• j is the angle of the nth floret in a polar coordinate system.
• r is the distance from the center of the capitulum to the nth floret.
• c is a constant scaling.
• The number 137.5 is the angle of this pattern. In the application,
the pattern is changed by this parameter. Therefore, it is not constant 137.5.

Figures 1 and 2 show the EEG headset is connected to the computer via Bluetooth, and uses the intermediary software ThinkGear
Connector [6] to send the received data to Unity [7] via UDP network protocol.
In NeuroSky EEG, there is a technology called ThinkGear, whosearchitecture is a sensor that touches the forehead, the contact points
and reference points on the earpads, and the onboard chip for processing all data. The ThinkGear chip analyzes, calculates, and outputs the brainwave data, including the Attention and Meditation
measures [8].

(1)

From this equation, we can get r, j. From r, j we can calculate thex, y values of the coordinate system to draw the pattern.	    x = r * cos (j ),y = r * sin(j ). (2)In Figure 3, it can be found that changing different angles will produce different pattern changes, so the angle is used as a variable in
the program to generate changeable patterns.

3.3. EEG Data

Figure 1 | EEG connecting to Unity by Bluetooth and UDP.

Different waveform data can be obtained from the signal from thebrain waves, such as alpha wave, beta wave, etc., as well as data on
concentration and meditation. We used the level of concentration
to generate graphics, and use the level of meditation as a reference
value for color and sound.

C.-T. Lin et al. / Journal of Robotics, Networking and Artificial Life 8(2) 117–121

In Table 1, the Attention value is reported on a relative eSense scaleof 1–100 [10]. It is direct-mapped into seven ranges to change theangle of the pattern. When the value of attention is low, the angle ofthe pattern is smaller; when the value is higher, the angle is larger.
Similarly, the Meditation value is reported on a relative eSense scaleof 1–100 [10]. It is direct-mapped into seven ranges to change thecolor of the pattern as shown in Table 2. They are represented byseven colors of red, orange, yellow, green, blue, indigo, and violet.
Obviously, these colors are the same as the chakra colors [11] , andthey also form the basic color of white light. This correspondence
is natural and conforms to the human body.
Figure 4 shows the patterns change depending on the value of theseven levels. The color of the pattern is changed from warm color
to cold color. The user also becomes calmer and gradually enters
the deep state of meditation.
In the sound part, the sound of ocean waves is used in the background, which makes people feel relaxed. In addition, different­frequencies of Tibetan bowl sounds are played by EEG’s meditation
state. When the participant enters deep meditation, the system willplay a calmer bowling sound.

3.4. Installation
Figure 5 shows the installation for the application which used a
projector to project the generated graphics onto the neutral wall,
allowing users to sit in front of the projection screen and watch.
This allows the user to relax and wear the EEG headset.

4. USER FEEDBACKA user study was conducted over 50 university students, between
the ages of 16–25. Include 44% of male and 56% of female. The
experiment apparatus and the projector were used to project thepatterns to the neutral wall. Each subject used the applications for
2–5 min. After that, subjects were asked to take an online survey.
The questions included what subjects thought while using theapplication and how they felt when they used the applications.
Figure 6 shows some patterns made by different subjects.

Table 1 | Use value of attention for angle j
Range of attentionAngle i

0–14
15–29
30–44
45–59
60–74
75–89
90–100

4159
7397
109
137.5
157

Figure 5 | Installation for the application.

Table 2 | Use value of meditation for color
Range of meditation

Color

0–14
15–29
30–44
45–59
60–74
75–89
90–100RED
ORANGEYELLOW
GREEN
BLUE
INDIGOVIOLET

Figure 4 | The seven patterns generated by different angles and colors.
The order is from left to right, up to down.

119

Figure 6 | Pattern generated by different subjects.

C.-T. Lin et al. / Journal of Robotics, Networking and Artificial Life 8(2) 117–121

120

to settle, reflect, meditate, and think, and find the inner peaceand answer.
In further researches, we need to find out what kind of content
can make users more relaxed. By setting up different contents andexperiential environments, the impact after the subject’s daily use
could be measured. These experiential findings could be guided tofind the method to improve the concentration of the users and how
to improve users’ creativity and productivity.

CONFLICTS OF INTEREST
Figure 7 | What are people doing while using the application.

The authors declare they have no conflicts of interest.

Figure 7 shows when people used the application, 44% tried tothink about different things to see the changes in graphics, colors,and sounds. 8% tried using different emotions to see differentchanges. 42% were in the state of emptying meditation. About 6%
were thinking about the meaning of these graphics and how such
patterns were made.

ACKNOWLEDGMENT

Among them, 84% found it interesting and novel. In addition to theartistry brought about by the graphics and color changes, almost
everyone wanted to know the meaning of these graphics andwhether they can understand their emotions or psychological state.

REFERENCES

5. CONCLUSION
The use of EEG to generate phyllotaxis is a very novel experience
for most people. As an installation art, the generated graphics havedifferent results according to the conditions of different people,
making the installation art show a variety of effects.
Through some applications, users can also recognize their own
mental state. Through different thinking patterns, imagination,and memories, people were able to produce graphics of different
colors. Seeing and feeling the visual and sound effects of thesegraphics can trigger new psychological states, such as excitement or calmness. In this way, we have space and time to face
our own state of mind and examine our inner state. It is like a
dialogue and communication with the self, allowing the heart

AUTHORS INTRODUCTION
Mr. Chien-Tung Lin
He received his B.S. degree from theDepartment of Computer Science andInformation Management, Providence
University, Taiwan in 1999. He is a Graduate
student at the Graduate Institute ofAnimation and Film Art, Tainan National
University of the Arts, Taiwan. His researchinterests include virtual reality, interactive art, EEG, art therapy,computer animation and healing method.

This research was supported in part by the Ministry of Science andTechnology of Taiwan under the grant (IV) MOST 109-2218-E002-038-.

[1] Leap Motion. Accessed December 6, 2020.
[2] Wikipedia, Wii. Accessed December 6, 2020.
[3] Wikipedia, Art therapy. Accessed December 7, 2020.
[4] M. Prpa, P. Pasquier, Brain-computer interfaces in contemporary
art: a state of the art and taxonomy, in: A. Nijholt (ed.), Brain Art,Springer, Cham, 2019, pp. 65–115.
[5] M. Zhang, Y. Huang, S.U. Ahmed, M. Shidujaman, Mapping between
mind cybernetics and aesthetic structure in real-time EEG art, in:
C. Stephanidis, M. Kurosu, H. Degen, L. Reinerman-Jones (eds.),
HCI International 2020 - Late Breaking Papers: Multimodality andIntelligence, HCII 2020, Springer, Cham, 2020, pp. 344–362.
[6] NeuroSky, ThinkGear Connector. Accessed December 7, 2020.
[7] Unity. Accessed December 7, 2020.
[8] NeuroSky, Hardware. Accessed March 14, 2021.
[9] A. Lindenmayer, P. Prusinkiewicz, The Algorithmic Beauty ofPlants, Springer-Verlag, New York, 1990, pp. 99–109.
[10] NeuroSky, eSenses. Accessed May 4, 2021.
[11] Healthline, chakras. Accessed December 8, 2020.

C.-T. Lin et al. / Journal of Robotics, Networking and Artificial Life 8(2) 117–121

121

Dr. R.P.C. Janaka Rajapakse

Dr. Yoshimasa Tokuyama

He is an Associate Professor at theGraduate Institute of Animation andFilm Art, Tainan National University ofthe Arts, Taiwan. And he is also a visiting scholar in the Department of Mediaand Image Technology at the Facultyof Engineering, Tokyo Polytechnic
University, Japan. He was a Postdoctoral
Researcher at the Center for Hyper Media
Research, Graduate School of Engineering, Tokyo Polytechnic
University. He received his PhD in Knowledge System Sciencefrom Japan Advanced Institute of Science and Technology in2008. His research interests include computer animation, motion
capture, VR/AR/MR, haptic interfaces, AI, computer graphics,and Kansei Engineering. He is a member of the Motion Capture
Society, The Society for Art and Science, ASIAGRAPH, and SIGDesign Creativity.

He is a Professor of the Department ofMedia and Image Technology at theFaculty of Engineering, Tokyo Polytechnic
University, Japan. He received his PhD in
Computer Graphics from the University ofTokyo in 2000. His areas of research interest
include computer graphics, haptics, virtualreality, shape modeling, game, and theirapplications. He is a member of the IPSJ,ITE, IIEEJ, and The Society for Art and Science.