
//
//objeito styve;
float distMaxima;
void setup() {
size(450, 450);
fill(255, 0, 0);
noStroke();
smooth();
fill(0, 255, 0);
distMaxima = dist(10, 10, width, height);
}
void draw() {
background(204);
for (int p = 10; p <= width; p +=40) {
for (int t = 20; t <= height; t += 40) {
float distMouse = dist(mouseX, mouseY, p, t);
fill(0, 250);
float diametro = (distMouse / distMaxima) * 120.20;
fill(0, 0, 150, 0);
float x = mouseX;
fill(200);
float y = mouseY;
float px = width/2 - mouseX; // inverte em X
fill(250, 0, 0);
float py = mouseY - height/2; // inverte em Y
fill(0, 0, 255);
float desvio = 30;
float centroX = random(width/2-desvio,width/2+desvio);
float centroY = random(height/2-desvio,height/2+desvio);
stroke(random(255), random(255), random(255));
ellipse(x, height, y, y);
fill(155, 0);
ellipse(px, height, py, py);
ellipse(p, t, diametro, diametro);
}
}
}
Nenhum comentário:
Postar um comentário