3 Exercício – Composição e texto
Animação da composição realizada no último exercício com inspiração na Pop Art.
//estado
float rot = 0;
float inc = 0.002;
boolean draw_large = false;
float mx = 0;
float my = 0;
void setup () {
size (500,500);
mx = width / 2;
my = height /2;
}
void draw () {
background (#F597CF);
rot = rot + inc;
// padrão
// balão de fala
fill (255);
circle ( 140, 190, 100);
circle ( 190, 130, 80);
circle ( 260, 130, 120);
circle ( 325, 170, 75);
circle ( 355, 240, 120);
circle ( 280, 280, 80);
circle ( 200, 280, 95);
circle ( 130, 270, 95);
rect (150, 160, 190, 130);
circle ( 340, 340, 40);
circle ( 370, 390, 30);
// texto
PFont title_font = createFont ("BARLOW BLACK", 135);
//float r = radians(-10);
//rotate (r);
fill (#FFF80F);
textAlign (CENTER);
textFont (title_font);
text ("OMG!", width /2, height /2);
fill (0,0,255);
textAlign (CENTER);
textFont (title_font);
text ("OMG!", width /1.9, height /1.9);
rot = rot + (PI/50);
translate (mouseX, mouseY);
rotate (rot);
noStroke ();
if (draw_large) {
scale (1.5);
}
fill (255,0,0);
int a = 25;
int spacing = width/a;
int b = 0;
while (b < a) {
int c = 0;
while (c < a) {
circle (10 + (c * spacing), 10 + (b * spacing), 12);
c = c + 1;
}
b = b + 1;
}
}
void mousePressed () {
draw_large = ! draw_large;
}
void mouseMoved () {
mx = mouseX;
my = mouseY;
}
void keyPressed () {
if (key == '+') {
inc = inc + 0.001;
}
if (key == '-') {
inc = inc - 0.001;
}
}
