Meda102 Assessment 2 – Red Cherry Blossom

Creative freedom is a blessing and a curse. During the duration of this assessment task, I had gone through multiple (8+) iterations before settling on the Red Cherry Blossom. This work is both experimentation and serendipity. Originally, the plan was to have an erratic line bounce off the walls in a random fashion.  From this idea, experimentation began with collision detection, and with a pinch of luck, it worked well, but it also did something unexpected. Whilst the plan was to hit the side, then begin on the other side again (I was going for a map type look here), the line jumped back to the random position set on the left side – this meant it produced a streak across the screen. From this, stroke colours and widths were tweaked so that the growing strokes differed from the streaks. This was heavily reminiscent of the Japanese Cherry Blossom. By having the lines draw infinitely, it appears that the flowers overlap the stems.

Note: This is an animated sequence

void setup() {
  size(600, 600);
  background(0);
  stroke(255);
  strokeWeight(5);
}

// Defines x, newX, y & new Y positions
float x, newX = 0;
float y = 300;
float newY = 300;

// Draws an infinite amount of lines with varying stroke colour
void draw() {
  newX = newX + random(-20, 40);
  stroke(random(255), random(0), random(0));
  strokeWeight(random(40));
  newY = newY + random(-40, 40);

  // Forces line to return to left side and draw again if it hits the right side
  if (newX > 650) {
    newX = 0;
    stroke(random(10, 255));
    strokeWeight(random(25));

    // Forces line touching the bottom to bounce off/remain inside box
    if (newY > 550) {
      newY = 550;
    }
  }
  // Forces line touching the top to bounce off/remain inside the box
  if (newY < 0) {
    newY = 0;
  }

  line(x, y, newX, newY);

  x = newX;
  y = newY;
}

Leave a Reply

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