Hello,

My name is Alyson Cardenas

profile picture

My Gordi drawing with background color variations.


GORDI

color background_color = color(250, 248, 202);
color allwhite_color = color(255, 255, 255);
color allblack_color = color(10, 10, 10);
color tongue_color = color(191, 138, 157);
//shape coordinates
int zero_x = 0;
int zero_y = 0;

print("Background");
background (background_color);
size(700,500); // width, height

float head_size = width/2.8;
float pupil_size = head_size/5.38;

//random background color
float random_color = random (0, 250);
background (random_color);

println ("1. Fence");
fill (204, 170, 108);
noStroke();
rect (zero_x, 100, 700, 100);

fill (204, 170, 108);
noStroke();
rect (0, zero_y, 100, 500);

fill (204, 170, 108);
noStroke();
rect (110, 0, 100, 500);

fill (204, 170, 108);
noStroke();

rect (220, 0, 100, 500);

fill (204, 170, 108);
noStro
ke();
rect (330, 0, 100,
500);


fill (204, 170, 108);

noStroke();

rect (440, 0, 100, 50
0);


fill (204, 170, 108);
noStroke();
rect (550, 0, 100, 500);

fill (204, 170, 108);
noStroke();
rect (660, 0, 100, 500);

println ("2. Grass");
fill (7, 140, 34);
noStroke ();
triangle (zero_x, 500, 58, 150, 50, 500);

fill (7, 140, 34);
noStroke ();
triangle (200, 500, 200, 300, 250, 500);

fill (7, 140, 34);
noStroke ();
triangle (300, 500, 400, 100, 350, 500);
fill (7, 140, 34);
noStroke ();
triangle (600, 500, 550, 150, 650, 500);
fill (36, 189, 66);
noStroke ();
triangle (100, 500, 79, 239, 50, 500);
fill (36, 189, 66);
noStroke ();
triangle (199, 500, 120, 90, 145, 500);
fill (36, 189, 66);
noStroke ();
triangle (550, 500, 379, 239, 450, 500);
fill (36, 189, 66);
noStroke ();
triangle (700, 500, 679, 239, 675, 500);
fill (7, 140, 34);
noStroke ();
triangle (500, 500, 550, 250, 545, 500);
fill (7, 140, 34);
noStroke ();
triangle (110, 500, 79, 190, 190, 500);

println ("3. Body and Tail");
noFill ();
stroke (7, 7, 7);
strokeWeight (10);
arc(340, 450, 190, 245, 0, PI+QUARTER_PI, OPEN);
fill (0, 0, 0);
noStroke();
ellipse(289, 500, 250, 280);

println ("4. Face");
//head
fill (0, 0, 0);
noStroke();
ellipse(289, 246, head_size, 290);
//ellipse

//ears
fill (allblack_color);
stroke (allblack_color);
strokeWeight (15);
triangle(190, 115, 218, 160, 246, 115);
fill (allblack_color);
stroke (allblack_color);
strokeWeight (15);
triangle(340, 115, 368, 160, 396, 115);

fill (allwhite_color);
noStroke();
ellipse(240, 246, 85, 145);
fill (allwhite_color);
noStroke();
ellipse(340, 246, 85, 145);
fill (105, 66, 17);
noStroke();

//pupils
ellipse(245, 226, pupil_size, pupil_size);
fill (105, 66, 17);
noStroke();
ellipse(345, 226, pupil_size, pupil_size);

fill (0, 0, 0);
triangle(340, 115, 368, 160, 396, 115);
fill (0, 0, 0);
triangle(190, 115, 218, 160, 246, 115);

println ("5. Mouth");
fill (8, 8, 8);
noStroke();
ellipse(289, 400, 140, 145);

//tongue
fill(tongue_color);
//float random_tongue_color = random (0, 250);
//fill (random_tongue_color);
arc(300, 320, 120, 245, 0, PI+QUARTER_PI, OPEN);

fill (allblack_color);
noStroke();
ellipse(240, 320, 145, 190);
fill (allblack_color);
noStroke();
ellipse(340, 320, 145, 190);
fill (allblack_color);
noStroke();
ellipse(290, 260, 125, 100);

fill (0, 0, 0);
triangle(260, 225, 288, 270, 316, 225);

println ("6. Woof");
noFill ();
stroke(allwhite_color);
ellipse(550, 175, 200, 145);
fill (allwhite_color);
ellipse(450, 250, 40, 40);
fill (0, 0, 0);

//text
textSize (50);
fill (random_color);
text("Woof!", 485, 195);

//save ("Gordi_screenshot10.jpg");