|Processing: Creative Coding and Generative Art in Processing 2|
Authors: Ira Greenberg, Dianna Xu & Deepak Kumar
Processing is a language aimed at artists and graphics people. This book attempts to introduce the language to the complete beginner - can it succeed without getting lost in graphics detail?
Processing is a great language and if you don't know it you really need to find out about it.
Based on Java, Processing provides exactly what the beginner needs to get on with creating simple to intermediate programs. It strips away a lot of the "admin" details of getting a program started and it provides direct access to the sort of commands that a beginner trying things out needs and finds rewarding.
In short, it is a great language to user to teach programming, but there are problems. Because it is so graphics based, it is very easy to focus on teaching graphics at the expense of the language and, more importantly, programming concepts.
Chapter 1 starts off with a crash course in computing and why you might want to get involved in learning Processing. Its message can be best summed up by a section title - Art+Science=Creative Coding. For some reason it feels the need to expose the beginner to the idea of assembler and machine code and other things that are unnecessarily technical. Fortunately this doesn't last long and we are soon looking at using Processing. The problem is that again there is too much material for the complete beginner to take in and it could be off putting if the reader isn't motivated. A complete tour of the Processing IDE could be left until after a first program has been written.
If you make it to chapter 2 then things get better. Here you are treated to a discussion of what programming is and pseudo code. The main task used as an example is to draw a face - first using pseudo code. this isn't a simple example but it does provides plenty of scope for explaining function calls, built-in shapes, co-ordinate systems and so on. It all might seem a lot of work but then at the end you do get a program generated face which is quite a bit of pay off. i still think that the book could do with a "hello world" type example, presumably in chapter 1 as a better way of introducing the Processing IDE.
Chapter 3 is a faster introduction to Processing telling you more about the language rather than working via a big example. Suddenly it starts getting technical with terms such as Boolean, scope and ternary being used. Not difficult but not aimed at dummies either. This is where the key programming ideas of flow of control are introduced - the if and the loop. All through the chapter the examples used are graphical rather than the more usual text or numeric based examples in other books - this is Processing after all. It is worth noting that all of the illustrations are in black and white in the print version of the book and color in the ebook form.
Chapter 4 introduces more Processing drawing facilities including curves. At this point you start to notice how many times a triangle has been drawn and how much trigonometry is involved in graphics. At the end of the chapter you have learned about Bezier curves and some aspects of animation.
The next chapter moves on to consider data and introduces arrays and reference types. From here we have a crash sources in objects and if you are expecting the usually encapsulation, inheritance and polymorphism route then you will be surprised to discover that the chapter explains objects by implementing simulated physics via two balls and a stick! Chapter 7 introduces text processing in a similarly creative way by making word clouds.
Chapter 8 introduces recursion, which is usually a tough topic but somehow in a book on creative graphics it seems to fit right in. You learn how to use recursion, not to do a quicksort, but to draw fractal curves.
Chapters 9 and 10 introduces the complex topic of bitmap graphics and here we meet bit manipulation in the form of pixels - lots of pixels. This is complex and technical stuff but there is still time for an excursion into complex systems and cellular automata. The coverage reaches some quite advanced techniques such as convolution and filtering - but this is what you need if you are going to do creative imaging.
The final chapter introduces 3D which is of course a whole different book. It also explains that the reader has hardly scratched the surface of the Java language and there is more to learn.
This book isn't for everyone. It seems to assume that the reader is intelligent and motivated but not a techie. As such it doesn't avoid introducing difficult ideas and it expects the reader to work at understanding what is going on. It also provides lots of motivation for learning these ideas because you can see that they are required to produce the graphics that are presented as examples.
One problem is that the need to keep providing graphics examples means that the presentation of the ideas isn't 100% logical and isn't complete. It often goes off at a tangent to chase some idea relevant to the generation of a pretty graphic rather than stay focused on the task of learning the complete syntax of some command or other.
This isn't a manual or a reference work. This is another reason why not every reader will like the approach. I thought it was fun and educational without talking down to the reader.
To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.
|Last Updated ( Friday, 02 February 2018 )|