15 Sep 2015
courses, documentation, icm
I wanted to create something terribly colorful.
If I set the opacity of the background to zero, and have a shape move across the screen, the stroke will leave a trail across the screen. Like a slug leaving a slime trail. What if I added color to the slime trail? What if it there were 10 psychedelic square slugs? Perhaps it would look like this.
For the slug trails, I used the random()
function to generate a different color every time the square moved across the screen. In order to get a nice mixture of colors, I created 9 different random variables. For instance, the stroke for one slug looks like stroke(r2, r4, r8);
and the next slug looks like stroke(r1, r4, r6);
.
In order to get the slugs to move, I created a rectangle rect(rectX,rectY,50,50);
. Before that, I set rectX=0; rectY=0;
in function setup()
and rectX++;
in function draw()
. So rectX moves from right > left, but I want rectX1 to move from left > right, and so forth. To get rectX1 moving left > right, I set rectX1=450; rectY1=50;
in function setup()
and rectX--;
in function draw()
.
Also, I wanted the mouse pointer to be trailed by an ellipse that left its trail on the screen. To get the trail to be left on the screen, the opacity must be set to 0 in the background (e.g. background('rgba(100,0,0, 0)');
). At the very top of the file (i.e. before function setup()), I declared var lastX; var lastY;
. In function draw()
, I did ellipse(lastX,lastY,10,10);
to create the ellipse. And at the bottom on function draw(), I did lastX=mouseX; lastY=mouseY;
, which positions the ellipse at the last point where the mouse was, thus the mouse pointer trail.
Finally, I like concrete poetry. I’ve wondered what digital concrete poetry would look like. The rhythm and basic additive properties of this sketch (squares moving alternately across the screen) lent some similarities to concrete poetry, so I tried adding a few words. The results aren’t rubbish, but they aren’t great either. Though it is only a first attempt, I do wonder whether a ‘digital concrete poetry’ is even possible. For an artform that was defined by exploring the limitations of a particular physical medium (typewriter), it almost seems disingenuous to use a tool/medium so much more advanced to replicate more basic forms.