Oh, sorry for not doing it before, I’m still new here.
PImage ceu1;
PImage ceu2;
PImage ceu3;
PImage criacao0;
Movie video;
//parametric variables
float t;
float c;
float w;
//rotate
float a;
float b;
//linear movement
float mx;
float mxy;
float my;
float myx;
float mspeedx = random (10,30);
float mspeedy = random (10,30);
//petal
float d = 8;
float n = 5;
float k = n / d;
float px;
float py;
//parametric equations
float x(float t) {
return sin(t/30)*30;
}
float y(float t) {
return cos(t/30)*30;
}
float a(float c) {
return cos(c/25)*150 + sin (c/12)*100;
}
float b(float c) {
return sin(c/25)*200 + cos(c/12)*100;
}
float q(float w) {
return sin(w/50)*300;
}
float e(float w) {
return cos(w/50)*250;
}
float limit = 0;
void setup() {
size(1080,720);
//video = new Movie(this, “fundo.mp4”);
//video.loop();
ceu1 = loadImage(“ceu1.png”);
ceu2 = loadImage(“ceu2.png”);
ceu3 = loadImage(“ceu3.png”);
criacao0 = loadImage(“criacao0.png”);
frameRate(30);
}
void movieEvent() {
}
void draw() {
imageMode(CENTER);
image(criacao0, width/2, height/2,30,30);
//non circular ellipses
ellipse(mx+x(t),300+x(t),30,30);
ellipse(mx+y(t),420+y(t),30,30);
mx = mx + mspeedx;
ellipse(500+x(t),my+y©,30,30);
ellipse(600+y(t),my+y(t),30,30);
my = my + mspeedy;
if(my >= height || my <= 0) {
mspeedy = mspeedy * random(-1,-3);
}
if(mx >= width || mx <= 0) {
mspeedx = mspeedx * random(-1,-3);
}
translate(width/2,height/2);
noFill();
stroke(0);
//internal ones, *N = distance from center
ellipse(x(t)*2,y(t)*2,30,30);
t++;
//internal ones, *N = distance from center
ellipse(x(t)*4,y(t)*4,30,30);
t++;
//internal ones, *N = distance from center
ellipse(x(t)*6,y(t)*6,30,30);
t++;
//internal ones, *N = distance from center
ellipse(x(t)*12,y(t)*12,30,30);
t++;
//internal ones, *N = distance from center
ellipse(x(t)*16+a©,y(t)*16+b©,30,30);
t++;
//internal circles that aren’t linear
stroke(0);
ellipse(q(w)+y(t),e(w)+x(t),30,30);
w++;
ellipse(e(w)+y(t),q(w)+x(t),30,30);
w++;
//external circles
ellipse(a©,b©,30,30);
c++;
ellipse(a©*2,b©*2,30,30);
c++;
//petal
** noFill();**
** for (float pa = 0; pa < TWO_PI * d; pa = pa + 0.02) {**
** float r = 400 * cos(k * pa);**
** //limit += TAU/1000;**
** ellipse(px, py,30,30);**
** px = r * cos(pa);**
** py = r * sin(pa);**
** }**
//rotação círculos maiores
rotate(a);
image(ceu1, 0, 0, 150, 150);
image(ceu3, 0, 0, 950, 950);
a = a + PI/2500;
rotate(b);
image(ceu2, 0, 0, 500, 500);
b = b + PI/1000;
}