Processing [2]

Exercício 2 de experimentação em processing, que consiste em fazer uma composição tipográfica utilizando o código de cálculo e load font.

O Código completo:

size(800, 480);
background (150,150,100);

float tamanho = 120;

int x = 0;
int y = 0;
int n = 10;
int spacing = width/n;

strokeWeight(3);

for (int j = 0; j < n; j=j+1) { for(int i = 0; i < n; i = i + 1) { fill(255); if (i >=5) {
fill(0);
}
square(x + (i * spacing), y + (j * spacing), tamanho);
}
}

fill(255, 0, 0);
while ( n < 100) {
square(x, y, tamanho);
x = x + 10;
y = y + 10;
n = n + 1;
}

PFont title_font = loadFont(“SuisseIntlMono-Bold-48.vlw”);
fill(255);
textSize(40);
textFont(title_font);
text(“Experiências”, 400, 197);
PFont ntitle_font = loadFont(“SuisseIntlMono-Bold-32.vlw”);
textSize(32);
textFont(ntitle_font);
text(“EDIT MPTEC”, 560, 230);

// A

fill(255, 0, 0);

triangle(500, tamanho, 550, 20, 600, 30);

triangle(600, tamanho, 550, 20, 600, 30);

triangle(520, 90, 500, 70, 600, 90);

// M

triangle(50, 460, 80, 400, 60, 380);

triangle(80, 450, 90, 390, 60, 380);

triangle(110, 470, 110, 400, 120, 390);

triangle(80, 450, 90, 390, 120, 390);

triangle(110, 470, 110, 400, 120, 390);

// C

triangle(690, 400, 680, 300, 660, 380);

triangle(650, 380, 700, 400, 760, 380);

triangle(670, 320, 700, 300, 760, 320);

Deixe um comentário