Generative Art: Recreating “Random Squares” by Bill Kolomyjec

For this assignment, we were asked to recreate one example from a previous Computer and Graphic Art magazine issue.

I picked Random Squares by Bill Kolomyjec, which was published in August 1977: In order to replicate it, I utilized the drawTarget() function, which is helpful when you’re trying to draw multiple separate targets. A few other important functions for making this work are translate(), pushMatrix(), and popMatrix(). I also found this Processing Cheat Sheet to be very handy, it covers most if not all of the basics.

I created a few variations, one that is true to the original, and two where I played around with colors and animation.

Here is the end result of the first variation. However, because the value for the number of squares drawn in each square is randomized, it is not completely identical to the original:

Here is my code:

  boolean playLoop = false; 
      
      void setup(){
        size(930, 1320);
         background(0);
         //frameRate(1); //for loop
         
      }
      void draw(){
      if(playLoop==false){
         for(float x = 0; x<250; x+=25){
         for(float y = 0; y<250; y+=25){
              drawTarget(10, 10, 130, 10); //naming function: first square
              drawsSequence(25); // naming function: translating the shape - repititon
         }
          }
         }
          }
            
            void drawTarget(float x, float y, float size, float scale){
              float space = size/scale; //distance between distinct squares
              float left= space/3; //tightening space between squares on top corner, to mimic visual pattern in the og image
         
              for (int i=0; i<scale; i++){
                rect(x+i*left,y+i*left, size-i*space, size-i*space);
                rectMode(CORNER); // to interpret first two parameters of rectangle as the upper-left corner of the shape
              }
            }
      
       void drawsSequence (int randomNumber){
      float x_=130;
       float y_=130;
        for (int i=0; i<7; i++){
          for (int m=0; m<10; m++){ 
             pushMatrix();
             translate(x_*i, y_*m); // adding new squares
             drawTarget(10,10,130, random(randomNumber)); // randomizing amount
             scale(0.5);
             //fill(112, random(255), 500); 
             //fill(random(255),231, 116);
             popMatrix();
           }
           playLoop = true; //to prevent loop
       }
      }

 

In the second variation, I commented out all the playLoop (true/false) boolean variables , and set the frameRate() to 60 frames per second to animate the shapes. I also set a fill(100, random(100),random(100)) to get a range of randomized dark colors . Here’s how it looked:

And by simply increasing the strokeWeight() to 40, I was able to generate a more abstract form of the variation above. I thought the result was visually appealing. Some of the shapes look a little bit like Arabic characters, and it reminds me of abstract + minimalist calligraphy art:

 

 

 

Response: Casey Reas @ Eyeo2012

“The computer is a unique device for the arts since it can function solely as an obedient tool with vast capabilities for controlling complicated processes, but then again, full exploitation of these unique talents for controlled randomness and detailed algorithms could result in an entirely new medium-  a creative artistic medium.” – Micheal Noll

I really enjoyed this presentation by Casey Reas, and I was particularly fascinated by the idea of using code to create generative art where you’re able to control randomness. I especially liked ‘The Tissue Work‘, which was built around ideas from a book by neuroanatomist Valentino Braitenberg. By using software, Reas built a simulation of these conceptual vehicles, and what was interesting was that order began to emerge within their patterns and behaviors over time. To simulate this process, they used order with “a little bit of chance”.

I found the concept of limiting and controlling the amount of randomness in computer art pieces really interesting, and it’s an element that I want to attempt to add to my piece for this week’s assignment, where we are replicating pieces from old issues of a Computer Graphics and Art magazine. Reas mentioned that in one of his projects, they used randomness as a “jumping off point” and I like the idea of utilizing randomness in art as a means of exploring what you can do, but not letting it take up too much of the work’s identity, in a way.

When Reas was talking about chance in art, he provided a few early examples of artists whose works reflect that notion, such as Dada artist Jean Tinguely’s Meta-Matics, a series of machines which automatically produce infinite sequences of drawings:

I really liked this example, especially given that at the time it was made, it was created in response to the then growing commercialization of art and to question the role of the artist amidst the “threat” of industrialization and mass-production. But today, this work has acquired more meaning and it can also be viewed in relation to the idea of exploring technology’s potential as a new medium for art, rather than a substitute.

Generative Art

I picked the computer generated art designed by Hiroshi Kawano for my recreation. Looking at it, I realize that it is black and white only. It also looks random, but there is a certain pattern to it, which reminds me of noise. I thought about how each pixel in the grid is either black or white. I attempted the design by doing a double for loop through the height and width of the screen size. I was able to create noise with the x, y values and multiplying it with a freq of 0.03 ((The image looks tighter if the freq was too high and sparse when the freq is too low)). Depending on whether the noise value is above 0.5 or below, I gave it stroke of either black or white. For each of those pixel in the screen, I made it a point(x, y) so that it would draw something.

From Triangulation:

My Recreation:

If I play with colors and adjust based on grey scale (without (if noiseVal < 0.5)):

The Code:

void setup() {
  size(640, 480);
}

void draw() {
  for (int i = 0; i < width; i++) {
    for (int j = 0; j < height; j++) {
      float freq = 0.03;
      float noiseVal = noise(i * freq, j * freq);
      if (noiseVal < 0.5) {
        stroke(255);
      } else {
        stroke(0);
      }
      strokeWeight(map(noiseVal, 0, 1, 1, 3));
      point(i, j);
    }
  }
}

I then tried to make the noise move since it has a x, y:

Code – Functions, Sine Ellipses, Noise Rectangles

Ellipses with Sine Modulation:

int numberEllipses = 32;
float segmentSize;
color c;

void setup() {
  size(640, 480);
  //divide the circle by number of ellipses we want to draw
  segmentSize = TWO_PI / numberEllipses;
  
  //show the use of function that returns an int
  println( multiplyBy2(100) );
  
  //set color to black to start
  c = color(0);
  noFill();
}

void draw() {
  background(255);
  stroke(c,100);
  drawCircles(width/2, height/2);
}

////////FUNCTIONS\\\\\\\\\

void keyPressed(){
  if (key==' '){
    c = color(random(255),random(255),random(255));
  }
}

//this is just for example and not used in the code
int multiplyBy2(int num) {
  return num * 2;
}

//draw one ellipse
void drawEllipse(int index) {
  //push and pop matrix to rotate this circle only
  pushMatrix();
  //change the rotation for each circle based on its index
  rotate(index*segmentSize);
  //the frequency is a scaled frameCount audjusted individually for each circle using i 
  float frequency = frameCount*.001*index;
  //the ampltiude adjusts a base height of 80 with sine
  float amplitude = 80 * sin(frameCount*.01);
  ellipse(0, 0, 170, sin(frequency) *amplitude );
  popMatrix();
}

//draw all the ellipses
void drawCircles(int x, int y) {
  pushMatrix();
  translate(x, y);
  for (int i = 0; i < numberEllipses; i++) {
    drawEllipse(i);
  }
  popMatrix();
}

 

 

Rectangles with Noise Modulation:

//width of each rectangle
int w = 8;
float speed = .01;
float granulation = .001;

void setup(){
  size(640, 480);
  rectMode(CENTER);
}

void draw(){
  background(255);
  //noise adjusting height of the rectangles
  for (int i=0; i<width; i+=w){
    //the slower the frequency the smoother the noise
    //use i to individuate each rectangle
    //scale i down some
    //then change over time with scaled down version of frameCount
    float frequency = (frameCount*speed) + (i*granulation);
    float amp = 100;
    //noise outputs between 0 & 1
    float adjustedNoise = noise(frequency)-.5; //make it so it gives us numbers between -.5 and .5
    float heightAdjustment = adjustedNoise * amp;
    rect(i+w/2, height*.25 + heightAdjustment, w, 100);
  }
  
  //noise adjusting rotation of the rectangles
  for (int i=0; i<width; i+=w){
    float frequency = (frameCount*speed) + (i*granulation);
    //map noise from 0-1 to 0-TWO_PI to get an angle around a circle
    float angle = map(noise(frequency), 0, 1, 0, TWO_PI);
    pushMatrix();
    translate(i+w/2, height-height*.25);
    rotate(angle);
    rect(0,0, w, 100);
    popMatrix();
  }
}

 

Reading Responses.

Attractive things work better
    Norman discusses the aesthetics of things and the nicer it is the better it works. The author is very right about the that attractive things work better, but not literally, of course. It works better to present it, to sell but most of the times (from my experience personally) aesthetics of the item can make the item not work properly (i.e. the pressure pads from my midterm project attached to the wooden brick broke fast). But Norman is definitely right about that the aesthetics of an object can provide easy usage. For example a simple game pad is and aesthetically designed object. You can just use buttons not attached together and that will be a mess and hard to use.

 

Attractive Things Work Better!

I had never really thought about this before, but it seems really logical after reading about it.

More Attractive Product –> User Feels Good –> User Can Think Creativly

Being able to go through the three different levels of the brain and showing how they work on an individual and collaborative scale. An interesting distinction that the reading made was that the visceral processing analyzes a situation and responds to it, but behavioral processing analyzes the situation and adapts the behavior accordingly. This distinction is very slight, but it’s important for understanding the applications of these different levels.

One part I really resonated with was when the reading outlined the musical aspect of behavioral and reflective processing and how reflective may often drop out while behavioral remains. I don’t know how many times I’ll play guitar and mess up as soon as I start thinking about what my next move is. This behavior, everyday/fixed routine sort of processing is what allows for muscle memory to form and it seems that reflective processing, while it does have its place, has to be supplemental to that muscle memory.

An example that I clearly remember is one day, my flute instructor played an entire song while I listed off what I did over my weekend. Once he was done playing, he repeated back to me everything that I had done over the weekend. This, I believe, is an example of behavioral processing helping him to keep playing while his reflective processing takes over the weekend plans.

I’m interested in how I can implement these processing levels in my future designs, now that we’ve read about how they truly impact the user experience.

Margaret Hamilton – What a Gal!

Now it makes sense why they wrote a hit musical about Hamilton! Although it seems like they strayed a bit from Margaret’s story…

Seriously, though, Hamilton’s stories is just incredible to read about. It’s inspiring to hear the story of a woman with such talent working in a field that was so dominated by men at the time. And not only that, but being a working mother in the 1960’s! Damn girl!

It reminds me of that Hidden Figures movie they made about Dorothy Vaughan, Mary Jackson, and Katherine Jonson who also worked at NASA and were the brains behind an operation. I wonder if Hamilton was also hidden, just as the three women in the film were. It’s funny. In the article, Hamilton says she feared that if she made a mistake, the press would point back to her and blame it all on her. Which is true, if she had made a mistake that cost the mission, she would have been ridiculed and shamed by the entire community, but throughout all of her success, how much recognition did she get? How many other people like Hamilton have we hidden away?

Attractive Things Work Better

As an artist, I liked this text because design, aesthetics, and the arts as a whole are a lot of times not appreciated and their value isn’t recognized as much as should be. In product design, the appealing look of the product can be almost as important as the product functionality. The Visceral, Behavioral and Reflective levels of processing and their effect on our feelings and emotions was interesting to read about. The appearance of a product, as shown in the text, affects the customers’ choice, as well as their experience. In my projects I always tried to make the product look appealing, as I think that’s always very important.

Reading Responses

Her Code Got Humans On the Moon – and Invented Software

I enjoyed reading this article as it informed me about a piece of history I wasn’t aware of. It was interesting how the passion of one woman was a major driver behind the Apollo 8 mission. It also demonstrated and emphasized the importance of thinking ahead and taking into account all the mistakes that could occur during a certain interaction, and taking the necessary precautions. In the case of Hamilton, she was able to predict an error that was presumably unlikely to happen, and went against the requests of her superiors to install the software needed to prevent the error from occurring. This provides us with a great example of the diligence necessary to foresee possible problems that could result during the interactions that we design for our projects.

Attractive Things Work Better

Norman examines how the aesthetics of an object or experience affect the user’s perception regarding its ease of use. Norman also delves into the importance of accounting for the emotions of the user when designing an interaction, and explain in simple terms that when people feel better about themselves they tend to become “better at brainstorming” and “examining multiple alternatives”. The reading made me question our reliance on aesthetically pleasing processes and how we favor those over less visually stimulating ones – even if it functions the same or even provides a more adequate performance. This made me more inclined to forgo aesthetically appealing choices in the projects I intend to make in the future, in order to challenge the notion of functionality in relation to form. The reading also sheds light on the cognitive processes behind the choices humans make, and the importance of design to the process of learning. Norman eloquently describes that the designer should preferably be in a positive state, since it could invariably affect their curiosity and creative processes, as well as how appealing their design is to the visceral, behavioral and reflective levels of users.

Response: “Emotional Design: Attractive Things Work Better”

In this chapter, Norman begins with an interesting anecdote about a study surrounding “attractive” ATM design by two Japanese researchers, and how people perceived attractively designed ATMs to be easier to use, even though they shared the same functions and buttons as some other, less attractive ATMs. Tracktinsy applied the same experiment to Israelis, thinking that “aesthetic preferences are culturally dependent”, and that the results stemming from Japanese culture would not apply to his experiment on Israelis. However, he was proved wrong and came to find that usability and aesthetics do correlate, contrary to his previous belief- and that to a large extent, they do so on a biological level, rather than a distinct cultural level.

Why do usability and aesthetics correlate, on a seemingly universal level?

Humans possess three levels of processing: visceral, behavioral and reflective. Each of these levels affect our interactions with design, objects and the environment. People are very similar at the visceral level, but it is at the behavioral and reflective levels that people differ and act differently. For one, we are genetically predisposed to have positive experiences with such things as smooth, symmetrical objects or “attractive” people or sensuous feelings, sounds and shapes (pp. 29). These “experiences” have been accumulated due to our evolutionary history, but humans also possess highly reflective abilities that enable us to, in a way, overwrite these biological histories.  Norman suggests that, in design, we need to cater to each of these three levels individually- but this also poses the question:  “How do each of the three levels compare in importance with the others?”. Norman proposes multiple solutions for this, but the solution I agree with the most is, satisfying the largest amount of needs by having a wide variety of products. An example of this which is mentioned in the chapter is magazines. No one tries to produce a magazine that caters to everyone, because it defies the point. Each magazine is special in its style, delivery, and audience.

So, coming back to the question of usability and aesthetics. Pleasurable aesthetics increase the usability of objects, on all three processing levels. Attractive objects trigger positive emotions, which in return enable our mental creativity and make us more tolerant of errors or difficulties in their design.