float x;
float cof = 75.0;
float xd = 360;
void setup() {
size(500,500);
background(0);
}
void draw() {
x++;
xd--;
background(0);
stroke(255,255,255);
float x1 = 250 + cos(xd*PI/180)*cof;
float y1 = 250 + sin(xd*PI/180)*cof;
float x2 = 250 + cos((xd + 180)*PI/180)*cof;
float y2 = 250 + sin((xd+ 180)*PI/180)*cof;
float x3 = 250 + cos(x*PI/180)*cof;
float y3 = 250 + sin(x*PI/180)*cof;
float x4 = 250 + cos((x + 180)*PI/180)*cof;
float y4 = 250 + sin((x+ 180)*PI/180)*cof;
ellipse(x1,y1,10,10);
ellipse(x2,y2,10,10);
ellipse(x3,y3,10,10);
ellipse(x4,y4,10,10);
line(x1,y1,x2,y2);
line(x3,y3,x4,y4);
}
|