Recitation 5: Processing Basics

Step 1: Choose your motif
This is the photo of a cat that I took a year ago. I will try to recreate it in an abstract way.

Step 2: Draw your image on paper

Step 3: Draw your image with code

I added a little bit of glitching effect apart from the abstract shape.

void setup() {
  //size(1000, 1000);
  fullScreen();
}
void draw() {
  // Your drawing code goes here
  background(0);
  stroke(random(255), random(255), random(255));

  
  smooth();
beginShape();
fill(255, 200, 111);
vertex(400, 100);
vertex(300,200);
vertex(400, 200);
vertex(400, 100);

//endShape();
  
  strokeWeight(10);
  line(400, 100, 300, 200);
  line(300, 200, 300, 400);
  line(300, 400, 200, 500);
  line(200, 500, 100, 700);
  line(100, 700, 300, 1000);
  line(300, 1000, 800, 1000);
  line(800, 1000, 900, 900);
  line(900, 900, 900, 600);
  line(900, 600, 700, 400);
  line(700, 400, 600, 400);
  line(600, 400, 700, 500);
  line(700, 500, 500, 400);
  line(500, 400, 600, 300);
  line(600, 300, 500, 200);
  line(500, 200, 400, 200);
  line(400, 200, 400, 100);
  endShape();
  
  
} 

Leave a Reply

Your email address will not be published. Required fields are marked *