Hi I need help please :(

for my processing project im trying to make 3 pandas holding green bamboo. The bamboo is supposed to be made with using a quad. And it also needs to be used with keypressed, everytime I press the key it should turn to a brighter or darker green but I do not know how to make bamboo using a quad. Can someone help me out please? Thank you

// Initialize size to output window and draw smooth lines and borders
void setup()
{
size(450, 350);

}

void draw()
{
// The x and y coordinates vary each loop
// and are calculated from mouseX and mouseY
float x, y;

// Erases the screen
background(255);

// Draw 3 pandas
// Values of ctr increment as follows: -1.5, -0.5, 0.5, 1.5
for (float ctr = -1.5; ctr <= 1; ctr++)
{
//x and y coordinates from upper left to the lower right
x = mouseX + ctr * 100;
y = mouseY + ctr * 195;

//feet
fill(0);
ellipse(x+100,y+160,90,50);
ellipse(x+220,y+160,90,50);

//Body
fill(255);
ellipse(x+160,y+130,140,90);

//head
fill(255);
ellipse(x+160,y+55,160,100);

//ears
fill(0);
ellipse(x+220,y+6,40,30);
ellipse(x+100,y+6,40,30);

//eyes
ellipse(x+190,y+42,50,50);
ellipse(x+125,y+42,50,50);

//nose
arc(x+160, y+65, 20, 20, 0, PI*1.0);

//pupil
fill(255);
ellipse(x+185,y+50,13,13);
ellipse(x+130,y+50,13,13);

//hands
fill(0);
ellipse(x+140,y+130,40,45);
ellipse(x+185,y+130,40,45);

//Bamboo
quad(38, 31, 86, 20, 69, 63, 30, 76);

}
}

Hello,

Please format your code as a courtesy to everyone:
https://discourse.processing.org/faq#format-your-code

There are lots of resources here:
https://processing.org/

It helps to use prints to the console for debugging:
https://processing.org/reference/println_.html

:)

I’m not sure if I can help with your specific question, but please note, unformatted code is hard to read! :frowning:

For example, this:

import processing.svg.*;    // import svg library

boolean record;    // set up record boolean

float x = 400;    // setup function runs only once

Is easier to read, than this:

//import svg library
import processing.svg.*;
//set up record boolean
boolean record;
//setup function runs only once
float x = 400;

Increase your chances for a faster response to your question. Please format your code. To learn how: https://discourse.processing.org/faq#format-your-code

Thank you!
:nerd_face:

Hi!
You have formatted only the bottom half of your code. Please select ALL of the code then format with the </> in the tool bar.
:slight_smile:

If the instructions in the link are not clear let us know so we can update them.

Should look something like this:

/ Initialize size to output window and draw smooth lines and borders
void setup()
{
size(450, 350);

}

void draw()
{
// The x and y coordinates vary each loop
// and are calculated from mouseX and mouseY
float x, y;

// Erases the screen
background(255);

:)