More selected projects

Cubular Lines (& Circles) 
by Rachel Max

I love when code breaks free from the screen such as in Physical Computing when code becomes integrated in interactive objects. In this project, animated generative and procedural code becomes part of an interior space. It’s an illusion as light is merely distributed from a projector but the effect is still slightly magical. Created in C++ with openFrameworks and ofxPiMapper, my projection mapping project explores the form of a pyramid made of cubes. The project is comprised of 6 scenes, each lasting 30 seconds. A fade to and from black provides the transition between scenes. 

This video is made by combining HD iPhone XS footage with video footage from a Lumix GX1 with a 20mm prime lens. I took several passes at recording - one with automatic focus so the video would go in and out of focus for a more artistic effect. The music is by Dan Deacon - my own face is F word from his album Meetle Mice.

Concept & Research

The pyramid made of cubes form repeats shape I felt somewhat comfortable coding (as opposed to triangles or circles). The hierarchy of the stacked pyramid shape also offered an opportunity to explore staggering visuals and creating interesting animations at the intersections of the individual cubes.

Before starting this assignment I did extensive research on YouTube of other projection mapping projects, especially those done on cubes. Here are a few I drew inspiration from:

Francesco Mori from 2016
Video projection mapping by Paul
3D Video Projection Mapping on Cubes with Quartz Composer by iasonf


Technical Discussion & Self Evaluation

I found myself feeling quite overwhelmed at the start of this project. My confidence in coding with C++ at the end of December was not high. This project offered an opportunity to play, learn, and grow - to design something on paper and then figure about how to code my own ideas. 

Any project involving writing code will take as much time as you give it and there is never enough time. Because of this and although we explored complex projects in class, I kept my designs manageable. Coding anything original was going to be personally challenging. On top of the C++ code, there was a lot to wrangle such as working with ofxPiMapper, scenes, detailed timing, JSON, and XML. It was quite easy to make a mistake and lose a lot of work!

I tried to code defensively. For example, I left the speed of each animation accessible and easily changeable with one variable. The transitions can be found quickly and modified to fit each scene. I’m quite proud I figured those out!

 fadetoBlack = 0;  //zero alpha
 fadeoutBlack = 255;  //full alpha

//fade out black to scene
if (ofGetElapsedTimeMillis() - startTime < 1000){
fadeoutBlack -= 20;
fadeoutBlack = ofClamp(fadeoutBlack, 0, 255);
ofSetColor(0, 0, 0, fadeoutBlack);
ofDrawRectangle(0, 0, fbo->getWidth(), fbo->getHeight());

//fade to black    if (ofGetElapsedTimeMillis() - startTime > 29500){       
fadetoBlack += 20; 
fadeoutBlack = ofClamp(fadetoBlack, 0, 255);   
ofSetColor(0, 0, 0, fadetoBlack);   
ofDrawRectangle(0, 0, fbo->getWidth(), fbo->getHeight())   

Upon further reflection and now that we have been learning how to use object oriented code, I could have possibly made a transition class. Fading to and from black worked well as a standard transition but given more time I would have loved to animate the transitions seamlessly where it was possible. Next time!

One big challenge I had was manipulating the FBOs - specifically when trying to animate lines around the entire pyramid as opposed to individual cube sides. Sometimes the FBO didn’t line up as expected. I found sectioning the FBOs to be difficult or at least that tweaking the FBO in any detailed way to be an exercise in madness. Maybe it was possible but after countless sunken hours, it was time to move forward. I managed to sort of achieve a version of this in Scene 5 - Contours but not as I had imagined.

Coming up with a color palette early in the process was helpful as it gave the project a sense of visual cohesion and a relationship between the scenes. openFrameworks has a ton of predefined colors which you can call by name in the code, but I wanted very specific colors so I defined my own. This was especially useful when I created a color vector for Scene 2 - Diagonal Rain.

Line width in openFrameworks doesn’t work as flexibly as it does in Processing. Because of this I choose to use rectangles to animate the lines in each scene. When appropriate, I added rounded line caps with a hacky but effective solution by adding circles to the beginning and end of each rectangle.

size = 30;
rad = size/2;   
heit = 300; 
wide = 300;   
a = -heit;  

ofSetColor (colorEight);
ofDrawCircle(440+rad, a, rad);  //end circle cap
ofDrawRectangle(440,  a, size, heit+a/4); 
ofDrawCircle(440+rad, a+heit+a/4, rad);  //start circle cap

I know pop-up exhibitions tend to be frantic but I wish we had a bit more time to finesse our surfaces and the use of our FBOs once in the space. Everything changes when you go from dummy object to real object in ways that no one can anticipate. For example, the rectangles in my Joining Lines scene are not as well aligned as they could be and my Contours scene could have been tighter or more exciting.

Considering all the challenges, I did pretty well on this project and I’m happy with the outcome. I kept my code lean, my scenes organized, everything complied and ran as designed, and I pushed myself considerably. I don't think I could have worked harder on this project actually, which is a lesson in itself.



Scene 2, Diagonal Rain was inspired by the album cover for Eliss by Futumani. I discovered this album after reading about the game Eliss in Processing by Casey Reas and Ben Fry. I was interested to play any game made in Processing and I found that I loved the soundtrack and audio cues.

Scene 6 was designed and coded in Processing by former Goldsmiths Computational Arts student Saskia Freeke. I love her work and was pleased that one of our assignments was to take one of her Processing projects and change the JAVA into C++. 

In many ways I find coding in Processing easier and actually used it as a first step on the Diagonal Rain scene (scene 2). Theo suggests manipulating other people’s code to make it your own but I found when I changed the circles to other shapes, that the intersections of the cube corners were less engaging. I changed the timing of Saskia's animation and colors slightly but I couldn’t bring myself to change her work too much. As I have five original scenes, I figured it was ok to include one Saskia scene.

Many of my approaches drew on the work we did over the first term of Workshops in Creative Coding as well as the ofBook by Lieberman et all, Mastering openFrameworks: Creative Coding Demystified by Yanc Chris, and the amazing openFrameworks course by Lewis Lepton.

BIG thanks to Harry Morely, Adam He, Alex Brigden, and to the openFrameworks forum (namely Zach Lieberman!) for help with converting my one of my scenes from Processing and general help with color arrays and vectors in C++.


  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image
  • gallery-image