Newbie question with animation
in
Programming Questions
•
1 year ago
Hello,
I have just started yesterday with processing and want to try to make a smiley with a changing smile.
The problem is, that I can't find the mistake. Either the animation is too fast or the programm dont count.
I don't want a solution - only a hint.
Thanks
Simone
void setup()
{
size(400,400);
background(255);
strokeWeight(5);
smooth();
}
void draw()
{
fill (255,255,0);
ellipse(200,200,350,350);
fill (255,255,255);
ellipse (150,150,50,70);
ellipse (250,150,50,70);
strokeCap(ROUND);
line (200,170,200,210);
smile();
}
void smile()
{
int i=1;
//stroke(255,255,0);
//fill(255,255,0);
//rect(150,250,100,40);
stroke(0,0,0);
arc(200,250,100,(0+i),0,PI);
if (i<=40) i=i+1;
}
1