I cant figure this out
in
Programming Questions
•
2 years ago
i cant figure out how to make the circle continue in a whole circle. nothings wrong, someone help me fix what I need!
int x = 20;
int y = 20;
//you must set the variables
void setup(){
size(400,400);
background(#000000);
}
//setup the interface
void draw(){
background(#000000);
ellipse(x,y,40,40);
if(x<380){
x=x+5;
y=y;
}
else if(x==380 && y<=380){
y = y+5;
x = x;
}
else if(y<=380){
y=y;
x=x-10;
}
else if(x >= && y >= 20){
x = -5;
}
else if(x <= 20 && y >= 20){
y = y -5;
}
}
int x = 20;
int y = 20;
//you must set the variables
void setup(){
size(400,400);
background(#000000);
}
//setup the interface
void draw(){
background(#000000);
ellipse(x,y,40,40);
if(x<380){
x=x+5;
y=y;
}
else if(x==380 && y<=380){
y = y+5;
x = x;
}
else if(y<=380){
y=y;
x=x-10;
}
else if(x >= && y >= 20){
x = -5;
}
else if(x <= 20 && y >= 20){
y = y -5;
}
}
1