# Ass­i­g­n­m­e­n­t 1

/For this assignment I chose to implement balance, harmony, energy and movement. My inspiration came from the Chinese Yin Yang symbol, which is often used to represent harmony and balance as well as energy. After looking at the traditional Ying Yang symbol, which is black and white, I decided tp utilise warm and cool colours to bring some vibrance into the picture. My laptop crashed several times during the making process and all browsers that I tried have failed to produce an image. The code seemed to freeze every time I attempted to run it. The first grading attempt was unsuccessful due to the fact that the code could still not be run even when it was extracted and run on different platforms. I had to rewrite the whole code from scratch. Now the code seems to be working fine. The warm and cool colours in the picture represent balance between fire and water, the two most commonly referred elements in China when talking about balance. The bezier urves symbolise the flowing of energy, as they are constantly changing./

• Show Sketch
``````/** @peep sketchcode */
//BOTTOM BLUE SQUARE
size(400,400);
background(255);
noStroke();
for(int i = 200; i <= 400; i += 400) {
for(int x = 300; x > i; x -=random(50)) {
for(int y = 300; y >= 50; y -=random(50)) {
fill(0, random(255), random(255), 80);
rect(i, i, y, y);
}
}
}

//TOP RED SQUARE
for(int a = 0; a <= 10; a += 200) {
for(int b = 20; b > a; b -=random(10)) {
for(int c = 200; c >= 50; c -=random(50)) {
fill(random(255), 0, random(190), 80);
rect(a, a, c, c);
}
}
}

//BEZIER CURVES
smooth();
strokeWeight(10);
stroke(255, 90);
fill(255, 60);
bezier(0, random(height),0,random(height),width, random(height),width, random(height));
bezier(0, random(height),0,random(height),width, random(height),width, random(height));
bezier(0, random(height),0,random(height),width, random(height),width, random(height));``````