Making Room for Creativity

90sgif3.gif

There are two things I miss most about the free time of youth. One is having time to create art. The second is having endless amounts of time to improve my Myspace page, which often entailed endlessly mining other peoples profiles for fancy html code that I could copy and paste into my own profile. Myspace was my first exposure to code and even though I could not read html, over time I gained the ability to dissect the code I was reading and know what parts to take if I liked something on someone else’s page.

While my current job involves knowing SQL, R, and Python - I don’t get to use code creatively. The output is either a statistical analysis or a predetermined chart with limited customization due to the desire to maintain the integrity of the information.

I’ve noticed Saskia Freeke and other artists who are producing digital art, but I was clueless as to how they were making their art. Tonight I decided to dig in and discovered Processing an open source software used to make #generativeart (static, interactive, and animated).

I was pleasantly surprised by the speed in which I was able to pick up the code syntax to create something of my own. I had some help from this Alexander Miller tutorial, but tweaked it to make it my own. His tutorial walks you through how to create a 90s era screensaver graphic, my result is the image I’ve shared in this post. For those interested in making one of their own, I highly recommend his tutorial, he really walks you through the nuts and bolts of the logic behind Processing and the various parts of the code.

Here is my final source code:


static final int NUM_LINES = 50;

float t;

void setup() {
  background(50);
  size(800, 800);
}

void draw() {
  background(100);
  stroke(0);
  strokeWeight(3);
  
colorMode(RGB, 100);
for (int i = 0; i < 20; i++) {
  for (int t = 0; t < 20; t++) {
    stroke(i, t, 0);
    point(i, t);
  }
}
  
  //puts point at center of page instead of left corner:
  translate(width/2, height/2);
  
  for (int i = 0; i < NUM_LINES; i++) {
  line(x1(t + i), y1(t + i), x2(t + i), y2(t + i));
  }
  t += 0.35;
}

float x1(float t) {
  return sin(t / 10) * 150 + sin(t / 4) * 25;
}

float y1(float t) {
  return cos(t / 15) * 120 + sin(t / 5) * 40;
}

float x2(float t) {
  return sin(t / 80) * 250 + sin(t / 3) * 30;
}

float y2(float t) {
  return cos(t / 10) * 200 + cos(t / 2) * 25;
}

Avolyn Fisher