Solve this entire Processing exercise with no aditional comments or explanations, simply…
- User
Solve this entire Processing exercise with no aditional comments or explanations, simply give me the altered code already perfectly solved: // last name: // first name: // class: // student number:
/* 1a) Make the bird move using the variables already declared below
1b) Let the bird follow the lines and change directions using the variables already declared below. Let the bird start again at the beginning of line one when it reaches the end of line 2.
Check the movie for a visual representation. Make sure things are only drawn once in each frame. */
color yellow = color(251, 224, 54); color lightYellow = color(251, 236, 144); color orange = color(244, 131, 24); color darkOrange = color(224, 121, 24); color red = color(131, 21, 14); color green = color(1, 114, 51); color brown = color(114, 71, 4); color darkBrown = color (84, 54, 4); color offWhite = color(241, 251, 231); color white = color(251); color black = color(4);
int xBird = 400; int yBird = 400; int xSpeed = -1; int ySpeed = 1; int stepSize = 1;
size (800, 800);
background(green);
// drawing of the nest. Keep it on screen at fixed location. So don't change the code.
fill(brown); strokeWeight(30); stroke(brown); arc(400, 700, 400, 180, 0, PI, CHORD); fill(darkBrown); ellipse(400, 700, 400, 100);
//eggs strokeWeight(1); stroke(black); fill(offWhite); ellipse(410, 685, 50, 35); ellipse(445, 710, 50, 35); ellipse(355, 690, 50, 35); ellipse(400, 700, 50, 35); ellipse(415, 715, 50, 35); ellipse(365, 715, 50, 35);
/* Code below draws the lines you have to follow Don't change the lines. Add code to change directions */ stroke(55); strokeWeight(20);
line (900, -100, 200, 600); // Line 1 xSpeed = -1stepSize ySpeed = 1stepSize line (200, 600, -200, 400); // Line 2 xSpeed = -2stepSize ySpeed = -1 stepSize
/* code below draws the bird you have to move over the lines. */
//feathers on head stroke(yellow); strokeWeight(10); line(395, 310, 370, 290); line(398, 310, 375, 275); line(400, 310, 390, 270); line(400, 310, 410, 280); noStroke(); fill(yellow); triangle(390, 310, 415, 315, 430, 290);
//head ellipse(400, 400, 260, 200);
//eyes fill(lightYellow); ellipse(370, 350, 35, 35); ellipse(430, 350, 35, 35); fill(black); ellipse(370, 350, 25, 25); ellipse(430, 350, 25, 25); fill(white); ellipse(375, 350, 5, 5); ellipse(435, 350, 5, 5);
//beak strokeJoin(ROUND); strokeWeight(20); stroke(darkOrange); fill(darkOrange); triangle(350, 400, 450, 400, 400, 470); noStroke(); fill(red); triangle(360, 400, 440, 400, 400, 460); stroke(orange); fill(orange); triangle(350, 400, 450, 400, 400, 425); triangle(350, 400, 450, 400, 400, 390);
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.