Content uploaded by Viktoriia Yuzkiv
Author content
All content in this area was uploaded by Viktoriia Yuzkiv on Jun 13, 2020
Content may be subject to copyright.
i
Declaration of Authorship
I, Viktoriia YUZKIV, declare that this thesis titled, “Judge a book by its cover. Gener-
ative approach.” and the work presented in it are my own. I confirm that:
•This work was done wholly or mainly while in candidature for a research de-
gree at this University.
•Where any part of this thesis has previously been submitted for a degree or
any other qualification at this University or any other institution, this has been
clearly stated.
•Where I have consulted the published work of others, this is always clearly
attributed.
•Where I have quoted from the work of others, the source is always given. With
the exception of such quotations, this thesis is entirely my own work.
•I have acknowledged all main sources of help.
•Where the thesis is based on work done by myself jointly with others, I have
made clear exactly what was done by others and what I have contributed my-
self.
Signed:
Date:
ii
“Digital is not here to put an end to anything. Rather it is here to expand all things, to
combine and to make more things attainable. For the artist, it is the edgiest work of all; the
biggest, most exciting challenge in a long history of the synthesis between technology and
hand and mind and heart.”
J.D. Jarvis
iii
UKRAINIAN CATHOLIC UNIVERSITY
Faculty of Applied Sciences
Bachelor of Science
Judge a book by its cover. Generative approach.
by Viktoriia YUZKIV
Abstract
This work is an example of generative art and design application in publication
graphic design. It shows how programming may be applied in a book covers gener-
ation. The work combines such fields of Computer Science as Natural Language Pro-
cessing (processing text data to get its structure and features), Algorithms and Data
Structures (representing and working with a tree data structure), and Data Visual-
ization (generation of cover elements). All covers are generated for Artemis Fowl –
a series of novels by Eoin Colfer. We propose three approaches to create elements
for book covers: from more data-driven and less generative to more generative and
less data-driven.
The idea was inspired by Stefanie Posavec’s talk about what ‘handmade’ means in
regards to data visualization and how data illustrators usually perform complicated
data processing without writing a simple line of code (Stefanie Posavec. Hand-Crafted
Data).
iv
Acknowledgements
First of all, I am grateful to my supervisor Andriy Gazin, who was always there
to help and give a piece of advice. Without him, this thesis definitely would not
be the same. Secondly, I want to say many thanks to my family and friends: for
their kindness and patience, love and support, always believing in me. Thirdly, I am
thankful for being a part of the Ukrainian Catholic University community. It gave
me so many possibilities to grow both personal and professional.
v
Contents
Declaration of Authorship i
Abstract iii
Acknowledgements iv
1 Introduction 1
1.1 Topic relevance ................................ 1
1.2 Goal ....................................... 1
1.3 Objectives ................................... 1
1.4 Structure of the thesis ............................. 2
2 Related works and background 3
2.1 Generative art ................................. 3
2.2 Natural Language Processing ........................ 5
2.3 Information Visualization .......................... 6
2.4 Conclusion ................................... 8
3 Data preparation 9
3.1 Data choice and source ............................ 9
3.2 Structure .................................... 9
3.3 Features .................................... 11
3.4 Output ..................................... 11
4 Book cover generation - approach 1 13
4.1 A radial tree .................................. 13
4.2 A gradient image ............................... 16
4.3 Layout ..................................... 17
4.4 Results ..................................... 17
5 Book cover generation - approach 2 19
5.1 A spiral plot .................................. 19
5.2 Layout ..................................... 21
5.3 Results ..................................... 21
6 Book cover generation - approach 3 23
6.1 Peter de Jong attractor ............................ 23
6.2 Layout ..................................... 25
6.3 Results ..................................... 25
7 Conclusion 27
Bibliography 28
vi
List of Figures
2.1 The stages of analysis in processing natural language .......... 6
2.2 Visual properties (encodings) compatibility with various data types
(Iliinsky, 2013)................................. 7
3.1 A book structure example .......................... 10
3.2 Text structure representation ......................... 12
4.1 An example of a radial tree graph ...................... 14
4.2 A radial tree graph for a book “Artemis Fowl”, parameters not tuned . 15
4.3 A radial tree graph for a book “Artemis Fowl” after parameters are
tuned ...................................... 15
4.4 A color palette for a book "Artemis Fowl and the Lost Colony" ..... 16
4.5 Color palettes for gradient images ..................... 17
4.6 "Artemis Fowl" book covers - approach 1 ................. 18
5.1 An example of a spiral plot ......................... 19
5.2 A spiral plot for a book “Artemis Fowl”, parameters not tuned ..... 20
5.3 A spiral plot for a book “Artemis Fowl” after parameters are tuned . . 20
5.4 "Artemis Fowl" book covers - approach 2 ................. 22
6.1 Examples of Peter de Jong attractor with different parameters ..... 23
6.2 A Peter de Jong attractor visualized for a book "Artemis Fowl" ..... 24
6.3 A Peter de Jong attractor visualized for a book "Artemis Fowl" ..... 25
6.4 "Artemis Fowl" book covers - approach 3 ................. 26
vii
List of Abbreviations
NLP Natural Language Processing
GAN Generative Adversarial Network
viii
Dedicated to 2020 coronavirus lockdown and all the delivery
services that helped survive.
1
Chapter 1
Introduction
When we talk about data visualization and design, it requires so much creativity and
patience, and sometimes it includes performing a lot of handmade data preparation
and processing. And it is where programming skills may be found useful to apply
and why generative art and design are becoming more and more popular.
1.1 Topic relevance
Over the last few decades, technologies became an essential part of human lives.
Technologies are indispensable when it comes to automatization of all the possi-
ble processes people deal with. Researchers do their best to use computing power
to decrease time spent on primary processing and preparation, create autonomous
systems that considerably expand results of human activity. And generative art, in-
cluding music, visual art, literature, architecture, live coding, etc. is an excellent
example of how art is developing and adjusting to trends. So what is generative art?
It is a broad category of art created as a result of autonomous system performance
which means that the artwork becomes a combination of an artist imagination and
algorithm-based computer generation. Talking about generative art in publication
graphic design (which includes books, newspapers, magazines and catalogues), it
gives an opportunity to create visual content that is based on publication character-
istics like text structure, sentiment, average words length, what text is about, etc.
Taking these and much more other factors into account allows presenting to end-
users more full understanding of publication in general. Moreover, it is convenient
to create publications design with generative art because of the easy adjustment of a
system to different inputs but at the same time maintaining set-up style and layouts.
1.2 Goal
The thesis aims to show a generative art application in publication graphic design.
The work will demonstrate how generative art can be a part of the book covers gen-
erating process. As we want to create a more complex understanding of generative
art advantages, three version of covers generation will be described and applied. As
a basis, we will take a series of novels by Eoin Colfer that is called Artemis Fowl.
1.3 Objectives
Performing of the next steps is essential to achieve the goal:
1. Processing texts to get the information needed for further visualizations. This
part includes data cleaning, getting its structure and extraction of its features
Chapter 1. Introduction 2
like text sentiment, the number of words in sentences and sentences in para-
graphs, average word length, etc. As a result, we will get books data repre-
sented as a tree and saved in JSON format.
2. Generation of visualizations using extracted data. The main point here is to
demonstrate how visualization can be applied in publication graphic design.
3. Creation of a cover layout that includes book name, author, generated image.
It is the last significant part with final cover generating. For each version of
covers for Artemis Fowl books, its own layout is created.
1.4 Structure of the thesis
Chapter 2. Related works and background
This chapter contains an overview of the history of generative art and what gener-
ative art is, what is Natural Language Processing and basic concepts important to
understand if you work with text data, why information visualization is essential
and some of the visualization techniques.
Chapter 3. Data preparation
Describes how data is chosen, processed and saved to use in further visualizations.
Chapter 4. Book cover generation - approach 1
In this chapter, we describe a data-driven book cover creation process based on book
structure and sentiment value. Two elements that are combined in a cover are a
graph generated with a radial tree approach and a background gradient image.
Chapter 5. Book cover generation - approach 2
Presents how a data-driven approach can continue displaying data insights, even
though it is supplemented with noise. The main generated element is a spiral plot
that displays a book structure.
Chapter 6. Book cover generation - approach 3
This section shows how a visual generated with attractors can be used in a book
cover. Average sentence length, average word length, and the average number of
sentences in a paragraph are used as the input parameters for an attractor function.
Chapter 7. Conclusion
Summarize the main ideas of three approaches and received results.
3
Chapter 2
Related works and background
2.1 Generative art
When it comes to a definition of what generative art is, there is no single answer. But
one of the most cited explanation was given by Philip Galanter, assistant professor at
the Department of Visualization, Texas AM University. In his paper “What Is Gener-
ative Art? Complexity Theory as a Context for Art Theory” which got more than 300
citations on Google Scholar Galanter presents the following definition: “Generative
art refers to any art practice where the artist uses a system, such as a set of natu-
ral language rules, a computer program, a machine, or other procedural invention,
which is set into motion with some degree of autonomy contributing to or resulting
in a completed work of art.” (Galanter, 2003) Moreover, Celestino Soddu, an archi-
tect and professor of Generative Design at Politecnico di Milano university in Italy,
explained it in a Generative Art Proceedings book of the 1988 Milan First Interna-
tional Conference Generative Art ‘98 in a more abstract way: “The Generative Art
builds possible worlds by creating evolutionary rules that produce events that if, on
one side, they are unpredictable and amazing, from the other one they mirror the
identity and recognizability of the idea, they are the natural representation of it.”
(Soddu, 1998)
Now, when we know what generative art is, it is time to find out how it is classi-
fied. Margaret A. Boden, a Research Professor of Cognitive Science at the University
of Sussex, distinguishes eleven types of generative art (Boden, 2009):
1. Electronic art, or Ele-art – involves electrical engineering and/or electronic
technology.
2. Computer art, or C-art – uses computers as part of the art-making process.
3. Digital art, or D-art – uses digital electronic technology of some sort.
4. Computer-assisted art, or CA-art – uses the computer as an aid (in principle,
non-essential) in the art-making process.
5. Generative art, or G-art – works are generated, at least in part, by some process
that is not under the artist’s direct control.
6. Computer-generated art, or CG-art – is produced by leaving a computer pro-
gram to run by itself, with minimal or zero interference from a human being.
7. Evolutionary art, or Evo-art – is evolved by processes of random variation and
selective reproduction that affect the art-generating program itself.
Chapter 2. Related works and background 4
8. Robot art, or R-art – is the construction of robots for artistic purposes, where
robots are physical machines capable of autonomous movement and/or com-
munication.
9. Interactive art, or I-art – the form/content of the artwork is significantly af-
fected by the behaviour of the audience.
10. Computer-interactive art, or CI-art – the form/content of some CG-artwork is
significantly affected by the behaviour of the audience.
11. Virtual Reality art, or VR-art – the observer is immersed in a computer-generated
virtual world, experiencing it and responding to it as if it were real.
As we can see here, generative art itself combines a broad range of technologies
application into art generation process.
History of generative art starts with the work presented by Ben F. Laposky in the
early 1950s (Nake, 2009). Being the U.S. mathematician and artist, Laposky gener-
ated images with the help of analogue electronic equipment and run several exhi-
bitions through the country. After a couple of years, generative art was presented
in Europe by Herbert W. Franke, an Austrian scientist and science fiction writer.
His experiment, similarly to Ben F. Laposky’s one, was based on using a camera
and oscilloscope to generate graphics. He demonstrated his work in Austria and
Western Germany in 1956, and later in the USA in 1965. Franke published innumer-
able books and researches, gave lectures and seminars sharing his experience and
promoting digital art. In particular, his book “Computergraphik – Computerkunst”
(Franke, 1971) covers a full foundation and development history of computer art.
After Laposky and Franke, the field became a point of interest for the scientific
community of that time. Mostly, engineers and mathematicians were concentrated
on exploring how using computer systems can be integrated into an art genera-
tion process. Prominent figures at this stage were A. Michael Noll, Frieder Nake
and Georg Nees. In 1963, Frieder Nake while working in the Computing Center
of the Technical University of Stuttgart merged the Center’s SELER56 computer
with ZUSE Graphomat Z 64 what served as the basis for graphic generating soft-
ware. Two years later, Nake collaborated with Georg Nees and held an exhibi-
tion “Computer-Grafik Programme” at the Wendelin Niedlich Galerie in Stuttgart
(Candy, Edmond, and Poltronieri, 2018). Early in 1965, two more exhibitions of
first samples of algorithmically generated art were held. The first one, “Georg Nees:
Computergrafik”, Nees presented at the Studiengalerie of Technische Hochschule
Stuttgart (Bense and Nees, 1965). Following him, A. Michael Noll, along with
his coworker Bela Jules from Bell Labs, exhibited a show of Digital Art and Pat-
terns “Computer-Generated Pictures” in the Howard Wise Gallery in New York City
(Noll, 2016).
Evolution of generative art is strongly related to the progress in improving com-
puters. The more powerful and accessible computers are, the more use computer
artists can take of it. Besides the implementation of algorithms using programming
languages to generate art, there are special instruments and tools created to facilitate
the lives of computer artists. For example, a Flash platform which now is owned
by Adobe was established in 1995 by a small start-up as a tool for art generation
Chapter 2. Related works and background 5
(Shaikh, 2017). Joshua Davis, an American artist, designer and author, is one the
first artists who used Flash with the purpose of creating art and shared source files
to the public what was an early establishment of open-source (Davis, 2000). Another
remarkable example is Processing - a programming language created as a research
project at the MIT Media Lab. It was supposed to help computer artist generate art
easier and faster, make the process of generating more accessible. A co-founder of
Processing Casey Reas presented plenty of solo and group art exhibitions, worked
on popularizing Processing (Reas and Fry, 2007). Furthermore, Artificial Intelli-
gence also has its influence on the field. Nowadays, plenty of artworks are generated
with GANs (generative adversarial networks) that were released by Ian Goodfellow
in 2014 (Goodfellow et al., 2014).
Nowadays, some outstanding artwork collections generated with the computer
help are presented by Robert Hodgin (Robert Hodgin: Portfolio), Joshua Davis (Joshua
Davis Studios), Aaron Koblin (Aaron Koblin: Portfolio), Bradley G. Munkowitz (fa-
mous as GMUNK) (GMUNK: Portfolio), Parag K. Mital (Parag K. Mital: Portfolio),
Golan Levin (Golan Levin and Collaborators: Portfolio). All of these are representing
visual art. However, generative art is not only about creating visual but also about
generating sounds. Robert M. Tomas (Robert M. Tomas: Portfolio) applies algorithms
and machine learning to compose music. A sound artist and researcher Laetitia Son-
ami (Laetitia Sonami: Portfolio) uses the data received from sensors connected to the
human body to create compositions. Generative artists, designers, scientists now are
a community of people who share experience and practices, organize annual onfer-
ence ((International Generative Art Conference) in Italy, create web-platforms on the
topic (Tech+Art), record podcasts (Generative Artistry).
In conclusion, generative art is the result of an artist collaboration with an au-
tonomous computer system. It is a technique that shows the beauty of art in a new
way. Generative art history starts from the early 50s and surely still have a lot to
show to the world.
2.2 Natural Language Processing
Due to a definition from Elizabeth D. Liddy’s book “Natural Language Processing”,
Natural Language Processing (NLP) is a theoretically motivated range of compu-
tational techniques for analyzing and representing naturally occurring texts at one
or more levels of linguistic analysis for the purpose of achieving human-like lan-
guage processing for a range of tasks or applications (Liddy, 2001). Commonly, it is
divided into several stages as they are shown in fig.2.1 (Indurkhya and Damerau,
2010):
•Tokenization – a text preprocessing part, dividing a text into tokens - instances
of a sequence of characters that are received from a stream and together can be
interpreted as a semantic unit.
•Lexical analysis – morphological processing of tokens.
•Syntactic analysis – understanding the meaning of sentences (lemmatization,
part-of-speech tagging, stemming, etc.).
Chapter 2. Related works and background 6
•Semantic analysis – understanding the meaning of words in a context of the
whole text (named entity recognition, word sense disambiguation, natural lan-
guage generation, etc.).
•Pragmatic analysis – understanding what a text means based on results of syn-
tactic and semantic analysis.
FIGURE 2.1: The stages of analysis in processing natural language
Using Natural Language Processing helps optimize business processes and that
is why revenues from the NLP market are instantly growing for the last few years.
According to Statista report, in 2017 revenues from the NLP market were approxi-
mately 3.2 billion U.S. dollars, but in 2025 they are predicted to reach 43.9 billion U.S.
dollars (Revenues from the natural language processing (NLP) market worldwide from
2017 to 2025 2019). Some examples of NLP use cases are creating chat-bots, spam
filters, fake news recognition, grammar check systems, disease diagnosis, speech
recognition, etc.
2.3 Information Visualization
As the amount of produced information is increasing rapidly every day, the ways
to discover data insights without the need to get acquainted with the entire data
collection are extremely valuable. Especially when it comes to large collections of
text data. Information visualization is “one key approach to gaining insight from
this mountain of data. It enables you to see the trends and patterns (along with
gaps and outliers) in the data that are not easily identified in row and columns of
numbers” (Iliinsky, 2013).
Depending on what you want to investigate, there are several text visualization
techniques highlighted (Cao and Cui, 2016). The first one presupposes creating
a similar representation of documents to find and visualize documents similarity.
Chapter 2. Related works and background 7
The method is divided into projection oriented techniques and semantic oriented
techniques. A popular approach to text visualization is the extraction of text con-
tent using, for example, keywords or phrases. Revealing text content is categorized
into summarizing a single document, showing content at the word level, visualizing
topics, showing events and storyline. The next crucial technique is illustrating text
sentiments and emotions. It allows creating a quick overview of how text polarity
changes. When we look at extensive document collections, there is a special set of
document exploration techniques - distortion based approaches, exploration based
on document similarity, hierarchical document exploration, search and query based
approaches.
After the visualization technique is chosen, the next step is to select representation
and visual properties that fits your data best. The criteria to do that is the compati-
bility of your data with the way of its illustration (Iliinsky, 2013). The compatibility
of visual properties with data types is shown in fig.2.2.
FIGURE 2.2: Visual properties (encodings) compatibility with various
data types (Iliinsky, 2013)
Chapter 2. Related works and background 8
After all, it is not enough just to understand the data. An effective information
visualization includes selecting an appropriate technique to get from the data the
most it is only possible and visual properties that are compatible with the data you
received.
2.4 Conclusion
In conclusion, combining generative art, Natural Language Processing, and data
visualization broaden possibilities of art and design. An example of book covers
created by Stefanie Posavec shows the limitation of the ’handmade’ approach to the
creation of visual elements (VA – Memory Palace). Posavec presented significant
illustrations, but to achieve the desired results, she had to spend plenty of time for
data preparation and visualization by hands. Using computer systems would help
her extract more data features and generate more complicated plots. So in this work,
we present advantages of automation of the visual elements generation process.
9
Chapter 3
Data preparation
3.1 Data choice and source
When we talk about publications in general, books are the most popular ones. Statis-
tics show that the trend of reading print books is stable for the last few years (Share
of adults who have read a print book in the last 12 months in the United States from 2011 to
2019). And one of the first things people see while deciding which book to read is its
cover. Why not try to make a book cover more representative then? In this work we
take not a single book, but a series of books to show the usefulness of generative art
in covers generation in a fuller way.
As a core data for generating covers, texts of Artemis Fowl novels by Irish author
Eoin Colfer are taken. Artemis Fowl is a series of eight fantasy books about the
adventures of a twelve-year-old boy who is a criminal mastermind. Seven out of
eight books are available at an open e-library RoyalLib (RoyalLib). It provides users
with free books in five formats: doc, rtf, fb2, html, txt. The following books from the
Artemis Fowl series are present in the library and will be used to perform the next
steps of the work:
1. Artemis Fowl
2. Artemis Fowl and the Arctic Incident
3. Artemis Fowl and the Eternity Code
4. Artemis Fowl and the Opal Deception
5. Artemis Fowl and the Lost Colony
6. Artemis Fowl and the Time Paradox
7. Artemis Fowl and the Atlantis Complex
All books are taken in txt format for convenient use when processing data.
3.2 Structure
Every Artemis Fowl book has the same structure: prologue at the beginning, chap-
ters, epilogue at the end. To use the book structure in the further visualizations we
need to remove prologue and epilogue, split the text into chapters, then chapters into
paragraphs and sentences, so we can receive a book structure parsed as a tree. Con-
sequently, the book that have n chapters, where the first chapter has m paragraphs
and Paragraph 1 is splitted into k sentences has to be shown as in fig.3.1:
Chapter 3. Data preparation 10
FIGURE 3.1: A book structure example
As all book in the series are saved in the same format and have the same structure,
the Book class with name and text attributes is created:
class Book:
"""
This is a class for processing Artemis Fowl books.
Attributes:
name (str): The book title.
text (str): The book text.
"""
def __init__(self, name, text):
"""
The constructor for Book class.
Parameters:
name (str): The book title.
text (str): The book text.
"""
self.name = name
self.text = text
Class methods that are created to get structure elements:
•remove_header(self)
•remove_footer(self)
•get_chapters(self)
•get_paragraphs(self, chapter)
•get_sentences(self, paragraph)
Chapter 3. Data preparation 11
Also, to receive a cleaned sentence as a list of strings a method get_words(self,
sentence) is written. It removes stop-words and punctuation, cast all words to low-
ercase. For example, for a sentence “Trawling through gigabytes of data, he found
hundreds of references to fairies from nearly every country in the world.” the method
returns:
[’trawling’, ’gigabytes’, ’data’, ’found’, ’hundreds’, ’references’,
’fairies’, ’nearly’, ’every’, ’country’, ’world’]
Text processing is performed using NLTK - a Python library to work with text data
(Natural Language Toolkit).
3.3 Features
Each structure element has its features defined.
Chapter:
•number of paragraphs
•sentiment score (from -1 to 1)
Paragraph:
•number of sentences
•average sentence length
Sentence:
•number of words
•average word length
3.4 Output
After text structure and features are extracted they are saved into a json file sepa-
rately for each book. If we look at the first sentence from a Chapter 1 in “Artemis
Fowl. The Arctic Incident” book, the result will be saved in a format that is shown
in fig.3.2.
Chapter 3. Data preparation 12
FIGURE 3.2: Text structure representation
13
Chapter 4
Book cover generation - approach 1
The first approach shows how two characteristics extracted from a book – its struc-
ture and a text polarity score – are used to create a book cover in a data-driven way.
Two main elements are a graph generated with a radial tree approach and a back-
ground gradient image.
4.1 A radial tree
A radial tree method is used to display a tree hierarchy, so the layout at every level
is represented radially. A tree we use to display has three levels. At the first level,
all children are connected to a root node. The children nodes placement can be split
evenly from the root or changes depending on weights received from the number of
children and root coordinates. In our data, a root is a book in general, and first-level-
children are book chapters. At the next levels, all nodes are distributed in the way
they don’t overlap with the neighbour nodes.
NetworkXS, a Python package for working with complex networks, is used to
represent a tree data structure and create visualizations (NetworkX). For example, a
simple radial tree with five nodes at the first level and with three children each at
the second level can be created like this:
1. Generate a networkx graph. The process is quite straightforward. Firstly, a
graph is initialized, and a root node 0 is created. Then, step by step, the next
nodes are adding along with connecting new nodes with their parents through
edges.
G = nx.Graph()
G.add_node(0)
count = 5
for i in range(1, 6):
G.add_node(i)
G.add_edge(i, 0)
for j in range(3):
count += 1
G.add_node(j)
G.add_edge(count, i)
2. Generate a plot. A Graphviz layout named “twopy” is responsponsible for
displaying graph as a radial tree. Here edge width and thickness are equal to
one, and also nodes are visible.
Chapter 4. Book cover generation - approach 1 14
plt.figure(figsize=(8, 8))
pos = graphviz_layout(G, prog="twopi", root=0)
nx.draw(G, pos,
with_labels=False,
alpha=1,
edge_width=1,
node_size=10,
node_color=’black’)
plt.axis(’off’)
plt.show()
The result of running the code above is shown in fig.4.1.
FIGURE 4.1: An example of a radial tree graph
In our dataset, a root node has from 9 to 16 children and each of them is a parent
for approximately 2000-3000 nodes. This means that out chart will be overloaded
with edges (fig.4.2). To make it look representative, we decrease edges width and
thickness, choosing values separately at each level. Also, we move the root node
from the center (fig. 4.3).
Chapter 4. Book cover generation - approach 1 15
FIGURE 4.2: A radial tree graph for a book “Artemis Fowl”, parame-
ters not tuned
FIGURE 4.3: A radial tree graph for a book “Artemis Fowl” after pa-
rameters are tuned
Chapter 4. Book cover generation - approach 1 16
4.2 A gradient image
A gradient image is basically split into n horizontal parts, where n – number of chap-
ters in a book. To create a gradient, each two neighbor colors are linearly interpolated
from color 1 to color 2.
For each book, three colors are chosen to indicate negative, neutral, and positive
sentiment scores of chapters. To get a color corresponding to a score, the function
map_colors(sentiment, pos, neg, neu) is implemented:
def map_colors(sentiment, pos, neg, neu):
"""
The function to get a list of hex color codes.
Returns:
list: A list of size len(sentiment) with hex color codes
corresponding to sentiment scores. Reversed to have colors in
the order from the beginning to the end of a book.
"""
colors = []
for i in sentiment:
if i < -0.1:
colors.append(neg)
elif i > 0.1:
colors.append(pos)
else:
colors.append(neu)
return colors[::-1]
Firstly, we chose colors for one book - "Artemis Fowl and the Lost Colony" (fig.4.4).
A generated gradient image for this book is shown in fig.4.5.a.
FIGURE 4.4: A color palette for a book "Artemis Fowl and the Lost
Colony"
To get colors for all the other books in a series, saturation and brightness stayed
the same, but a hue value was changed. The received color palettes are shown in
fig.4.5.b.
Chapter 4. Book cover generation - approach 1 17
(A) A gradient image for a book "Artemis Fowl and the Lost
Colony"
(B) Color palettes for seven books
FIGURE 4.5: Color palettes for gradient images
4.3 Layout
A book cover consists of three parts: front cover, spine, back cover.
Layout elements are:
•A gradient image - placed from back to front of a cover. Colors for all books
are described in a section 4.2. A gradient image.
•A radial tree graph - centered in a spine. Color - white.
•Author name and surname - placed both in a spine and front cover. Font -
Affect Light, color - white.
•Book series title - placed both in a spine and front cover. Font - Affect Bold,
color - white.
•Book part (number) - placed in a bottom part of a spine (font - Affect Bold,
color - gray) and in a right bottom corner of a front cover (font - Affect Light,
color - white).
•Book part (title) - placed right below a book number in a front cover. Font -
Affect Light, color - white.
4.4 Results
This chapter describes how a book cover is created based on two characteristics:
structure and sentiment. This approach is basically data-driven and clearly illus-
trates parameters through the created visual. A radial tree graph in the cover gives
a better understanding of how a book text is distributed. Also, using a gradient that
shows how sentiment changes from chapter to chapter as a background provides
readers with additional information on the book atmosphere in general. Covers for
all seven books are shown in fig.4.6.
Chapter 4. Book cover generation - approach 1 18
FIGURE 4.6: "Artemis Fowl" book covers - approach 1
19
Chapter 5
Book cover generation - approach 2
This chapter describes a data-driven approach with noise added to show the book
data. A book structure is displayed in a spiral plot with book chapters as main vi-
sual components and paragraphs along with their sentences as the data that creates
visual noise in a graph.
5.1 A spiral plot
FIGURE 5.1: An example of a spiral plot
A spiral plot displays data along an Archimedean spiral (Lockwood, 1961). The
main graph nodes (chapters) are placed in a spiral starting from its center. In our
case, all nodes are plotted equidistant from each other. Positions of the nodes are
generated with a spiral layout implementation from a Networkx Python package.
For instance, a spiral plot for an example graph from a section 4.1 A radial tree
(fig.5.1) can be generated in the following way:
pos = nx.spiral_layout(G, resolution=1, equidistant=True)
nx.draw(G, pos,
with_labels=False,
alpha=1,
node_size=6,
node_color=’black’)
Chapter 5. Book cover generation - approach 2 20
The first plot generated based on a book structure is shown in fig.5.2. After chang-
ing parameters to make plot look representative, we stopped on the following val-
ues: resolution (the compactness of the generated layout) = 0.5, alpha (line width) =
0.06, node_size = 6 (fig.5.3).
FIGURE 5.2: A spiral plot for a book “Artemis Fowl”, parameters not
tuned
FIGURE 5.3: A spiral plot for a book “Artemis Fowl” after parameters
are tuned
Chapter 5. Book cover generation - approach 2 21
5.2 Layout
For this approach, a cover layout consists of such elements:
•Background - a monochrome black image.
•A spiral plot - placed in a front cover. Color - white.
•Author name and surname - placed both in a spine and front cover. Font -
Affect Light, color - white.
•Book series title - placed both in a spine and front cover. Font - New Dawn,
color - white.
•Book part (number) - placed in a bottom part of a spine (font - Affect Bold,
color - white) and in a central bottom part of a front cover (font - Affect Light,
color - white).
•Book part (title) - placed right below a book number in a front cover. Font -
Affect Light, color - white.
•Book series title initials - pressed letters that are placed in the center of a back
cover. Font - New Dawn.
5.3 Results
This chapter shows an example of how data-driven approach to create a book cover
design can be diversified with adding data as a noise. A book structure is illustrated
with a spiral plot. Book chapters are visible in a plot as white clusters of nodes. The
results are shown in fig.5.4.
Chapter 5. Book cover generation - approach 2 22
FIGURE 5.4: "Artemis Fowl" book covers - approach 2
23
Chapter 6
Book cover generation - approach 3
In this chapter, we present a generative approach to the book cover creation process.
As a basis for generation, we chose a Peter de Jong attractor. Such text features as
average word length, average sentence length, and the average number of sentences
in a paragraph are used as the attractor parameters.
6.1 Peter de Jong attractor
An attractor is a set of states (points in the phase space), invariant under the dynam-
ics, towards which neighboring states in a given basin of attraction asymptotically
approach in the course of dynamic evolution (Attractor. From MathWorld–A Wol-
fram Web Resource). Peter de Jong attractor was published in the article Computer
Recreations, Scientific American in July 1987 (Computer Recreations). It is defined as
follows:
xn+1=sin(ayn)−cos(bxn)
yn+1=sin(cxn)−cos(dyn)
where x,y - coordinates of points; a, b, c, d - four parameters; n - number of
iterations. As initial points we took x0=0 and y0=0.
Examples of Peter de Jong attractor performance according to different input pa-
rameters a, b, c, d are shown in fig.6.1.
(A) a = 1.11, b = -1.92, c = 1.25, d = -1.45 (B) a = -1.35, b = -1.53, c = 1.12, d = -1.78
FIGURE 6.1: Examples of Peter de Jong attractor with different pa-
rameters
Chapter 6. Book cover generation - approach 3 24
To generate images that are a part of a book cover, we set the next parameters
(tab.6.1.):
•a - the average number of sentences in a paragraph
•b - the average length of words
•c - a number in range from 1 to 7
•d - the average length of sentences
We chose these book features as parameters in the order mentioned above after
experimenting with different values and comparing the received results.
TABLE 6.1: Books features, average
Book part Word length Sentence length Number of sent. in a paragraph
1 5.864 4.25 2.435
2 5.848 4.382 2.63
3 5.732 4.501 2.404
4 5.792 5.069 2.814
5 5.739 4.748 2.568
6 5.881 5.199 2.381
7 5.78 5.792 2.387
For a first book with parameters a = 2.435, b = 5.864, c = 1, d = 4.25 a generated
plot for a Peter de Jong attractor is shown in fig.6.2. Color palettes were received in
the same way as it is explained in a section 4.2 A gradient image. An image for a
book "Atremis Fowl" with colors added is shown in fig.6.3.
FIGURE 6.2: A Peter de Jong attractor visualized for a book "Artemis
Fowl"
Chapter 6. Book cover generation - approach 3 25
FIGURE 6.3: A Peter de Jong attractor visualized for a book "Artemis
Fowl"
6.2 Layout
The layout for this approach of book cover creating includes:
•Background - an image generated with De Jong attractor, a spine is black.
•Author name and surname - placed both in a spine and front cover. Font -
Affect Regular, color - white.
•Book series title - placed both in a spine and front cover. Font - Deco Metro
Bold, color - white
•Book part (number) - placed in a bottom part of a spine. Font - Affect Bold,
color - gray)
•Book part (title) - placed right below a book series title in a front cover. Font -
Affect Bold, color - white.
•Book series title initials - pressed letters that are placed in the center of a back
cover. Font - Deco Metro Bold.
6.3 Results
In this chapter, we created book covers based on images generated with Peter de
Jong attractors. Visually these covers do not tell additional information about books
themself, but as book parameters are used to create images, all covers differs from
each other. Results are shown in fig.6.4.
Chapter 6. Book cover generation - approach 3 26
FIGURE 6.4: "Artemis Fowl" book covers - approach 3
27
Chapter 7
Conclusion
This work shows how generative art can be applied in publication graphic design.
We illustrated how data preparation and processing in design can be changed from
handmade to computer-based and automatic. We described and implemented three
approaches to create book cover elements based on the data extracted from a book
text for an Artemis Fowl series of novels by Eoin Colfer. As a result of the text
processing part, we had such features as text structure, sentiment score, number of
words, number of sentences, and sentence length accessible to use as parameters for
generation of visual elements. Approaches change from clear representing of book
data to using text features only as parameters in the generative system correspond-
ingly. All book covers are available in Artemis Fowl book covers.
To sum up, using generative art to create publications design broaden possibili-
ties of what can be illustrated. Moreover, it gives more flexibility and adjustability
to creating visual based on distinctive inputs.
28
Bibliography
Bense, Max and Georg Nees (1965). “rot 19. Computer-Grafik”. In: University of Stuttgart.
Boden, Margaret A. (2009). “What is Generative Art?” In: Digital Creativity.
Candy, Linda, Ernest Edmond, and Fabrizio Poltronieri (2018). Explorations in Art and
Technology. Second Edition. Springer-Verlag London Ltd. ISBN: 9781447173663.
Cao, Nan and Weiwei Cui (2016). Introduction to Text Visualization. Atlantis Press.
ISBN: 9789462391864.
Davis, Joshua. Joshua Davis Studios.URL:https://joshuadavis.com.
— (2000). New Masters of Flash. 1st edition. Friends of ED Ltd. ISBN: 1590592093.
Dewdney, A. K. Computer Recreations.URL:http : / / paulbourke . net / fractals /
peterdejong/peterdejong.pdf.
Franke, Herbert W. (1971). Computergraphik – Computerkunst. Verlag F. Brickmanh
KG, München.
Galanter, Phillip (2003). “What Is Generative Art? Complexity Theory as a Context
for Art Theory”. In: 6th Generative Art Conference.
Generative Artistry.URL:https://generativeartistry.com/episodes/.
Goodfellow, Ian et al. (2014). Generative Adversarial Nets.URL:arxiv.org.
Hodgin, Robert. Robert Hodgin: Portfolio.URL:http://roberthodgin.com/portfolio/.
Iliinsky, Noah (2013). “Choosing visual properties for successful visualizations”. In:
IBM Software. Business Analytics.
Indurkhya, Nitin and Fred J. Damerau (2010). Handbook of Natural Language Process-
ing. Second Edition. Taylor and Francis Group, LLC. ISBN: 9781420085938.
(International Generative Art Conference.URL:https://www.generativeart.com.
Koblin, Aaron. Aaron Koblin: Portfolio.URL:http://www.aaronkoblin.com.
Levin, Golan. Golan Levin and Collaborators: Portfolio.URL:http://www.flong.com.
Liddy, E.D. (2001). Natural Language Processing. Encyclopedia of Library and Infor-
mation Science, 2nd Ed. NY. Marcel Decker, Inc.
Lockwood, E.H. (1961). A book of curves. Cambridge Univ. Press.
Mital, Parag K. Parag K. Mital: Portfolio.URL:http://pkmital.com/home/.
Munkowitz, Bradley G. GMUNK: Portfolio.URL:https://gmunk.com.
Nake, Frieder (2009). “Creativity in Algorithmic Art”. In: University of Bremen. CC.
Natural Language Toolkit.URL:https://www.nltk.org.
NetworkX.URL:https : / / networkx . github . io / documentation / stable / index .
html.
Noll, A. Michael (2016). “Howard Wise Gallery Show of Digital Art and Patterns
(1965): A 50th Anniversary Memoir”. In: Leonardo. Cambridge, MA, USA:MIT Press.
Posavec, Stefanie. Stefanie Posavec. Hand-Crafted Data.URL:https : / / vimeo . com /
46304381.
—VA – Memory Palace.URL:http://www.stefanieposavec.com/memory-palace.
Reas, Casey and Benjamin Fry (2007). “Processing: A Programming Handbook for
Visual Designers and Artists”. In: MIT Press.
Revenues from the natural language processing (NLP) market worldwide from 2017 to 2025
(2019). URL:https : / / www . statista . com / statistics / 607891 / worldwide -
natural-language-processing-market-revenues/.
Bibliography 29
RoyalLib.URL:https://royallib.com/.
Shaikh, Rafia (2017). Get Ready to Say Farewell to Flash Player as Adobe Has Finally
Decided to Pull the Plug.URL:wccftech.com.
Share of adults who have read a print book in the last 12 months in the United States from
2011 to 2019.URL:https://www.statista.com/statistics/222668/usage-of-
printed-books-and-e-books-by-category/.
Soddu, Caleste (1998). Generative art: proceedings of the 1988 Milan First International
Conference Generative Art ’98. Generative Design Lab, Milan Polytechnic Univer-
sity.
Sonami, Laetitia. Laetitia Sonami: Portfolio.URL:http://sonami.net.
Tech+Art.URL:https://www.maketechart.com.
Tomas, Robert M. Robert M. Tomas: Portfolio.URL:http://robertthomassound.com.
Weisstein, Eric W. Attractor. From MathWorld–A Wolfram Web Resource.URL:https:
//mathworld.wolfram.com/Attractor.html.