float angle = 0.0; float a = 0.05; float b = 100; float c = 82; void setup() { size(500,500); noStroke(); smooth(); } void draw() { background(255); fill(123,167); float x = b+cos(angle)*c; rect(x,150,x,x); fill(45,231); float x1 = x+cos(angle)*c/2; ellipse(x1,250,100,100); angle += a; }