Skip to main content Skip to search Skip to search

Art Digital

Generative Art for Python

by (author) James R. Parker

foreword by Brian Wyvill

Publisher
UpRoute
Initial publish date
Jan 2023
Category
Digital, Image Processing
  • Paperback / softback

    ISBN
    9781988824871
    Publish Date
    Jan 2023
    List Price
    $42.50

Add it to your shelf

Where to buy it

Description

Generative Art for Python instructs beginner level to advanced programming using Python programming language. Contained in the book are many examples that integrate both graphics and sound, plus core programming concepts. On the beginner and intermediate levels, graphics concepts such as manipulating images, animation, texture mapping and video techniques are covered. Advance level concepts include sound effects and audio, 3D geometry and animation, and interactive games. In James R. Parker's words, "Generative Art is all about your imagination and how to create a description of what you want to do and not limit that by what the computer allows you to do. This book shows you how to use the computer to do what you want, not what the software wants. When you create your own software, then you are not limited by someone else's imagination. "

About the authors

Dr. James R. Parker is a Professor of Art at the U of Calgary and author of Generative Art: Algorithms as Artistic Tool.

James R. Parker's profile page

Brian Wyvill's profile page

Excerpt: Generative Art for Python (by (author) James R. Parker; foreword by Brian Wyvill)

FOREWORD by Brian Wyvill PhD With a view of the island of Telendos in the Aegean Sea, I sip my tea and take pleasure in writing this foreword for Jim Parker’s new book Generative Art for Python. Welcome to the first book of its kind about Generative Art using Python. The book is especially aimed at the artist, who wants to learn enough to create their own generative artworks. My own introduction to the fact that computers could be used as a tool by artists came in 1969 at Event One in London. As a Physics undergraduate at that time, I had discovered how useful a computer could be as a tool for mathematics and physics. It was a revelation that a computer could be used for art too. The event launched the Computer Art Society under the leadership of the late John Lansdowne, later one of the external examiners on my PhD committee, who also helped recruit me to work as a postdoc at the Royal College of Art in London. My PhD subject was ‘a graphics language for artists.’ At the RCA, I was happy to work with artists and art students, some of whom became leaders in a movement, which saw the computer as a disruptive tool for artists. The vision of people such as John Lansdowne and George Mallen, saw ahead to an era where computers would play a huge role in the field of architecture and even to a day when simulation and graphics would become commonplace in movies. Their company, System Simulation was formed in 1970, and is still alive and well today. Sysim, as we affectionately called the company in the mid-1970s had negotiated a contract to produce what would be the first significant amount of computer animation on the Hollywood big screen. I was fortunate enough to be included as one of the programming team working on the first Alien movie (released 1979) with computer savvy animator, Colin Emmett. Five decades later, that disruptive movement has given birth to many branches of art, some of which are highly commercial such as animation and gaming. Generations of artists have grown up in an era where their messy introduction to painting with a palette of childhood paints has been replaced by computer applications. Physics-based simulation research in computer graphics has led to applications which can mimic the nuance and flow of watercolor and oil paints at the touch of a button. In the 21st century, deep-learning and other forms of artificial intelligence have dominated most academic research papers in vision and graphics, and gradually creep into the creative arts. When defining the basic principles, Prof. Parker points out that “Generative art is the art of the algorithm.” It is interesting to see how that last word has become so much a part of modern art. Even today, generating your own creative artwork from an algorithm requires an understanding of programming a computer. Sure, there are many application programs out there to help the artist, but without basic programming skills what is generated will be forever watermarked as being created by somebody else’s program. That is why Jim Parker’s book is a must for an aspiring artist to realise their creativity through building their own algorithms. I was fortunate enough to have Jim Parker as a colleague, for my quarter of a century as a professor at the University of Calgary department of computer science. Jim has four decades of experience in teaching programming to bring to bear, as well as a passionate interest in the arts. That experience he puts to good use in writing a book to help artists realize their algorithmic dreams. The book takes the artists on a philosophical explanation of how a computer, a tool for processing numbers, can represent text, graphics, images, sound and a whole lot more. The book starts with the basics. Pointing out that people, not computers create art, but the computer can be used as a very powerful tool in that process. Randomness and its place in generating art is well discussed in the book. In nature, a tree branch starts as a bud; some buds thrive, others die. As a bud grows into a branch, each year the branch grows and produces more buds. The startling thing is that this is not a random process. If it were, all trees would look roughly the same, but most of us can distinguish an oak tree from a larch. The patterns and shapes created by the tree become a recognizable tree species and all slightly different from each other. Therein lies the randomness, as Professor Parker points out, how the artist uses randomness is very important. A wonderful source of generated art lies in the world of fractals. A world of self-similar patterns, which can describe the geometry of many things in nature. Many mathematicians cringe at the public interpretation of the word ‘fractal’ coined by Benoit Mandelbrot in his famous book; The Fractal Geometry of Nature. Here Mandelbrot develops a mathematical way for describing natural objects such as coastlines. I am glad to see that Prof. Parker doesn’t get waylaid in the argument that to be fractal a shape must have measurable complexity metric, called the fractal dimension. Many self-similar shapes are incorrectly called fractal. One of the examples of fractals are certain types of space-filling curves. Like many definitions in mathematics, there are traps for the unwary. A self-similar curve must tend to fill a specific area as the number of generations increases. This is true for the Koch curve given in Jim’s book, which is in fact fractal with a fractal dimension of 1.26. This is the beauty of this book, that such details are a distraction, and an artist can make practical use of the of the well-chosen concepts, which Prof. Parker has assembled without going into the esoteric land of mathematically precise terminology. To make life easier for the artist in their journey into programming, the very popular and easy-to-use language, Python has been chosen. A great choice as the language is relatively easy to learn. Unfortunately, Python does not have built-in graphics, so the artist/programmer has to choose a Python library of which there are many. To facilitate this process Professor Parker has selected the package ‘Glib’ a nice package to make things easy for artists. As a computer graphics researcher, it is interesting that recent graphics packages for languages such as Python and JavaScript, seem to universally decide that the Y-axis should have its origin at the top of the window and go down the page. A choice almost never made by computer graphics researchers, who generally choose the Y-axis to go up the page from an origin at the bottom left, following Descartes and what every school child learns. Interestingly, the notion of Y-axis down comes from the original TV technology using cathode ray tubes and early graphics devices. Before flat screens an electron beam physically scanned the screen from left to right and top to bottom. Clearly, the Python packages were not written by members of the computer graphics community. Of course, there is an easy fix to change the origin—left as an exercise for the reader. Generative Art for Python teaches an artist how to program in a simple and logical fashion, using graphical examples. I also learned this way, many years ago in a very different language on primitive machines with a graph plotter to give me feedback. How great it is to have color output instantly and to be able to visualize animation without waiting for film to be processed, as it was in the 70s and 80s. The book gives great positive feedback, giving inspiration to an artist going down this path for the first time—a wonderful way to learn. The well-chosen examples such as a snowstorm are a delight for experimentation. From here to producing lines, which are more like human-drawn lines, is a difficult step, since computer-generated lines are of high precision. My own research shows that to get lines indistinguishable from human-drawn would be a big step in algorithm complexity, but Jim gets most of the way there in his typical style, offering a highly effective simple algorithm for this task. Jim Parker’s truly excellent book can take an artist on a journey into producing their own algorithmic art, exploring animation, texturing, imaging, gaming and that vital step to add a user interface to make it easy for others to use the artist’s algorithms. If you are wondering if this is the book for you, after all you will be investing many hours into learning these steps, then take a leaf from the words of Linus Torvald: “Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.” I have been programming since 1967, and I have thoroughly enjoyed every moment. — Brian Wyvill, Kalymnos Greece and Victoria BC, November 2022

Editorial Reviews

"The first book like this of its kind." Brian Wyvill, professor Emeritus, University of Victoria

Other titles by