I cant make the 2 ellipses move ive tried everything please help
in
Programming Questions
•
6 months ago
This is my code, i have tried using the float and i just cant seem to get the faces to move only a certain part,
can someone please guide me thanks a lot in advance...
////////////////////////////////////////////////////////////////////////
PVector pos1, pos2;
PVector vel1, vel2;
///////////////////////////////////////////////////////////////////////
void setup()
{
size(640, 480);
pos1 = new PVector (random(0, width), random(0, height));
pos2 = new PVector (random(0, width), random(0, height));
vel1 = new PVector (random(-2.0, 2.0), random(-2.0, 2.0));
vel2 = new PVector (random(-2.0, 2.0), random(-2.0, 2.0));
}
//////////////////////////////////////////////////////////////////////
void drawFace()
{
strokeWeight(4);
fill(255, 255, 0);
ellipse(40, 40, 80, 80);
point (30 , 30); point (50 , 30);
arc(40, 40, 50, 50, radians(0), radians(180));
}
//////////////////////////////////////////////////////////////////////
void drawFace2()
{
strokeWeight(4);
fill(255, 255, 0);
ellipse(140, 40, 80, 80);
point (130 , 30); point (150 , 30);
arc(140, 40, 50, 50, radians(0), radians(180));
}
//////////////////////////////////////////////////////////////////////
void draw()
{
background(255);
drawFace();
drawFace();
drawFace2();
drawFace2();
}
//////////////////////////////////////////////////////////////////////
1