int x4=250, y4=250; int v=1; int x, y, r; float alf; int x1, y1, r1; float alf1; int x2, y2, r2; float alf2; int x3, y3, r3; float alf3; PImage xx; PImage a; PImage sd; PImage as; PImage aw; void setup() { size(600, 600); r=200; r1=150; r2=100; r3=50; xx=loadImage("Vladlox.png"); a=loadImage("VladikKosmos.jpg"); sd=loadImage("Vladlox1.png"); as=loadImage("Vladlox2.png"); aw=loadImage("Vladlox4.png"); } void draw() { image (a, 0, 0, 600, 600); alf+=1; alf1+=1; alf2+=1; alf3+=1; x=round(300+r*cos(PI*alf/180)); y=round(300+r*sin(PI*alf/180)); ellipse(x, y, 10, 10); x1=round(300+r1*cos(PI*alf1/150)); y1=round(300+r1*sin(PI*alf1/150)); ellipse(x1, y1, 10, 10); x2=round(300+r2*cos(PI*alf2/120)); y2=round(300+r2*sin(PI*alf2/120)); ellipse(x2, y2, 10, 10); x3=round(300+r3*cos(PI*alf3/100)); y3=round(300+r3*sin(PI*alf3/100)); ellipse(x3, y3, 10, 10); ellipse(300, 300, 10, 10); if(keyPressed){ if( keyCode == RIGHT && x4<585) {x4++; v=1; } if( keyCode == LEFT && x4>15) {x4--; v=2; } if( keyCode == DOWN && y4<585) {y4++; image (as, x4, y4, 100, 150); v=3; } if( keyCode == UP && y4>15) {y4--; image (xx, x4,y4,50,50); v=4; } } if (v==1) image (sd, x4, y4, 100, 150); if (v==2) image (aw, x4, y4, 100, 150); if (v==3) image(as, x4, y4, 100, 150); if (v==4) image(xx, x4, y4, 50, 50); }