xxxxxxxxxx
89
//Designed and created by Lu Jia
//INSTRUCTIONS:
//Click to save your winningSheep.png
//DESCRIPTION:
//This is a black sheep running in a race. And far ahead of the others.
//REFLECTION:
//I used similar shape and code to create two completely different creatures. Which I find it to be quite interesting. As when I was drawing by hand. I tend to depict the flower in a more realistic way. There are more details and decorations. Because I have 100% freedom and a lot more control to draw it the way I want. In someway the freedom may limits my imagination of what a flower can look like. But when it comes to p5 sketch. My drawings are a lot more abstract and I start to think of using unsual shapes to compose the flower. The discovering and experimenting process actually expand my imagination of the form of a flower.
function setup() {
createCanvas(400, 400);
colorMode(HSB);
}
function draw() {
background(47, 18, 78);
push();
fill(101, 25, 25);
rect(0, random(282, 285), width, height / 2);
pop();
push();
translate(width / 2, height / 2);
textSize(random(146, 153));
// textSize(150);
fill(15, 96, 37);
textFont('Amatic SC');
textStyle(ITALIC);
textAlign(CENTER);
text('RUN!', 0, random(-45, -50));
// noFill();
// stroke(15, 96, 37);
// strokeWeight(2);
// text('RUN!', -16, -2);
pop();
translate(width / 2, height / 2);
let h1 = random(-15, -25);
let h2 = random(0, 20);
let h3 = random(-9, -18);
let h4 = random(-9, -18);
let h5 = random(-4, -6);
let h6 = random(3, 6);
// fill(47, 18, 78);
fill(60, 3, 13);
// stroke(30, 4, 18);
// strokeWeight(1.5);
rect(-20, h3 + 55, 15 / 2, 60, 20);
rect(15, h4 + 55, 15 / 2, 60, 20);
noStroke();
for (let i = 0; i < 10; i++) {
fill(60, 3, 13);
ellipse(0, 30, random(55, 70), random(60, 90));
rotate(PI / 5);
}
fill(47, 18, 78);
arc(0, -20, random(17, 27), random(35, 60), 0, PI, CHORD);
// arc(random(-18,-21), -20, 10, 20, 0, PI + QUARTER_PI, CHORD);
// arc(random(18,21), -25, 10, 30, 0, PI - QUARTER_PI, CHORD);
push();
fill(60, 3, 13);
ellipse(h5, -15, h6, h6);
ellipse(h5 + 10, -15, h6, h6);
pop();
frameRate(9);
}
function mousePressed() {
save('winningSheep.png');
}