xxxxxxxxxx
void setup() {
size (900, 900);
}
void draw() {
background(#FF6600);
rectMode(CENTER);
stroke(#FFFCFC);
strokeWeight(4);
noFill();
frameRate(50);
float wave = sin(frameCount * 0.01) * 250;
float Rotate = sin(frameCount *0.01) * 360;
rect (width/2 + wave, height/2, 400, 400);
fill(#FF423B);
ellipse(width/2 - wave, height/2, 400, 400);
fill(#EDFF00);
ellipse(width/2, height/2 - wave * 1.2, 50, 50);
noFill();
pushMatrix(); //draww a triangle
translate(width/2, height/2);
rotate(radians(1+ Rotate));
float x1 = 0;
float y1 = -200;
float x2 = 200;
float y2 = 200;
float x3 = -200;
float y3 = 200;
triangle(x1, y1, x2, y2, x3, y3);
popMatrix();
noFill();
rectMode(CENTER);
rect (width/2 + wave * 1.5, height/2 + wave * 1.5, 150, 150);
rect (width/2 - wave * 1.5, height/2 + wave * 1.5, 150, 150);
pushMatrix();
rotate(radians(1+Rotate));
popMatrix();
saveFrame("output/aaa_####.png");
}
void drawTri() {
}