More selected projects

Geometric Procession


code and projections by: Ernie Lafky

music by: The Pangolins

Introduction

"Geometric Procession" is a nostalgic homage to early Modernist abstraction, 1960s Minimalism, and the pioneers of computational, generative art. It embraces the mathematical precision and repetition that’s inherent in computers, juxtaposed against computationally-generated illusions of natural phenomena.

Part 1 - Stairs Down Stairs

The opening section shows a series of white rectangles fall and slide down a black staircase to form a set of black and white stairs. It references my earliest coding classes where we learned the most basic shape one can create: a rectangle. I added a simple physics engine to give this basic geometry some natural movement. Gravity increases the velocity, while a spring-like resistance slows the rectangle on the horizontal planes. This spare approach calls to mind the Minimalist sculptures of Donald Judd and Carl Andre where a simple algorithm is established and executed.

The movement of the rectangles is intentionally slow so that the wave-like movement can be appreciated and time gets elongated. The viewer is invited to slow down and notice the subtle changes of this meditative piece.

Technically, the location, velocity, and acceleration of the rectangles is controlled using mathematical vectors (ofVec2f) which are stored and updated in a corresponding set of "vector" arrays. The color and acceleration (or force) alternate by testing the y-location against a series of "if" statements.

Part 2 - More Mohr

With the alternating black and white stairs established, a set of black and white circular shapes pop onto the sculpture. These 2D designs were inspired by the generative computational art pioneer, Manfred Mohr, particularly his early work. During the 1960s, Mohr shared the aesthetic concerns of Minimalist and Conceptual Art (e.g. Sol Lewitt), but invited a computer to collaborate and generate the final result by following a set of rules. "More Mohr" takes a similar approach. The compositional elements take one step up from rectangles by using triangles, circles, and sets of short arcs. These 3 simple shapes are varied and layered using 3 different treatments: flat fill, outline, and negative space. The variants are applied to each of the simple shapes, creating 3 different layered shapes that are rotated around a circle in thirds. The circular compositions are then rotated again in thirds, and these 3 variants are drawn across each row.

To add some life to these numerically obsessed forms, the size of each simple shape grows and shrinks using a sine wave with a random frequency. Though mathematically repetitive, the sine waves create the illusion of organic transformation and natural cycles. The random variation in each unique composition is again meant to invite the viewer to meditate on subtle modulations.

Technically, this piece uses a classic nested for loop to generate the grid and a generous dose of push, pop, translate, and rotate to create each composition. The random frequencies of the sine waves were generated in setUp, then stored in “vector” arrays.

Part 3 - Digital Doilies

In Part 3, the most complex forms in "Geometric Procession" are generated from the fewest lines of code. From simplicity arises complexity. The basic ingredients are a circle, rotation, and recursion.  In openFrameworks, the resolution of a circle can be set by defining the number of sides that make up an equal-sided polygon. So a polygon with 50 sides looks like a circle, but hacking an openFrameworks circle with a resolution of 3, 4, or 5 generates a triangle, square, and pentagon respectively. The simple shapes then form the branches of classic recursion trees. In programming, recursion is a function that calls itself within the function and can generate complex shapes such as fractals, the Mandelbrot set, and trees. The recursive shapes are replicated, rotated, and evenly distributed around a circle, creating surprising and complex compositions.

In addition to the functions described above, a nested for loop is again used to generate an evenly spaced grid of compositions and to increment the number of trees drawn on each step at any given point in time. To keep the increasing and decreasing number of trees change with a clock-like frequency, I nested a sine function inside of an arcsine function. The resulting movement pattern is a flat sawtooth shape which makes the rate of change constant (as opposed to the smooth undulations created by a sine wave alone).

Mixing these basic ingredients together creates compositions that are mathematically cold and abstract, but call to mind natural formations such as snowflakes or artisanal handicrafts like crochet, carpets, or lace doilies. Modernism is woven with needlepoint in a meditation on geometric patterns.

Part 4 - Wracked Nervous Rects

Hearkening back to Parts 1 and 2, Part 4 draws inspiration from generative art pioneers Veera Molnar and George Nees as well as 1960s Minimalism. It exposes and celebrates the square grid that underlies the shape of the stairs, then animates, distorts, and degrades the geometrical perfection with the illusion of natural forces.

Technically, the nested squares and grid are generated with layers of nested for loops. The seemingly solid lines of the squares are made up of multiple short lines, allowing them to be distorted when transformations are applied. To keep track of all of the vertices, I use “vector” arrays of mathematical vectors (ofVec2f), and even "vector" arrays of "vector" arrays of mathematical vectors. The movement of the squares is controlled by frame-based incrementing variables applied to a sine wave, a noise function, and the degrees of rotation, creating variance across the grid.

The resulting animation shifts from rigid order to near chaos. The periodical sine wave rotations meet interference that’s generated by Perlin Noise. Perlin Noise is an algorithm used in computer graphics to create natural-looking variations that can be applied to 1D, 2D, or 3D shapes. It’s often used for the illusion of terrain and organic textures. 

Problems and opportunities for future development

Problem 1: Resolution, resolution, resolution. Both the video projector and the odd shortcomings of ofxPiMapper led to late realizations that my detailed graphics were going to look jagged and pixelated, like they’d been sent through a digital cheese grater. The meditative effect I was trying to achieve was compromised.

Solution: The Agile Scrum method of software development advises that applications get built in vertical slices, production ready, in every sprint. In other words, I should have built a section of the piece, ported it into ofxPiMapper, then done a test projection before starting any other sections. I might have solved the resolution problems or pivoted to a design that’s more suitable to the technical limitations. Instead, I was caught short at the last minute with no time to fix it.

Problem 2: Though the piece begins smoothly, the rest of the transitions between sections are straight cuts, making the rhythm feel choppy. These sharp shifts made it harder for the viewer to stay in the altered sense of time.

Solution: Create entrances and exits for the shapes, animating them from off-screen into their place on the steps, then back off-screen at the end of the section.

Problem 3:  A simple physics engine is used for the opening section, but then it’s never used again in the piece.

Solution: The gravity and resistance vectors could be used in each section of the piece, potentially helping with the transitions. A rising and falling horizontal wind vector could also have added some more variety.

Problem 4: Despite the resolution problems, I still liked the slow pace, creating a slowly evolving, hypnotic sculpture rather than a high energy animation that is always trying to entertain. And yet the piece could have used a bit more development.

Solution: More fluid transitions and more consistent use of physics-based movement could have addressed this issue (as outlined in the solutions to problems 2 and 3 above).

References
  • "More Mohr" came out of an assignment by Joe McAlister at Goldsmiths. The code is all mine, but using Manfred Mohr as inspiration came from Joe.
  • "Digital Doilies" was based on "Tree 2", a tree-generating recursion template coded in Processing by Joe McAlister. "Tree 2" was in turn inspired by Lior Ben-Gai’s work.
  • "Wracked Nervous Rects" was inadvertently inspired by "Mandala Shapes", a homework assignment created by Dr. Theo Papatheodorou at Goldsmiths. No code snippets were borrowed, however.
  • The idea of creating long straight lines from multiple short lines was inspired by the book "generative art - a practical guide using processing" by Matt Pearson. Again, no code snippets were borrowed.
  • Music by The Pangolins is licensed under a Creative Commons Attribution-ShareAlike License and was downloaded from FreeMusicArchive.org. The two songs used were "Generate Silence" and "Deep Anchor", both of which were lightly edited to fit the timings in the video.
  • All graphics were created in openFrameworks. No off-the-shelf commercial digital art software was used.