Gabriela Correa: Arreglo de puntos

| Título | |
|---|---|
| Palabras Clave | tarea 5 |
| Asignatura | Taller Inicial 1ª y 2ª Etapa, |
| Del Curso | Imagen Escrita 2012, |
| Carreras | Diseño Gráfico"Diseño Gráfico" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property. |
| Alumno(s) | Gabriela Correa |
| Profesor | Herbert Spencer |
Instrucciones:
Color de fondo:
Negro: e
Blanco: w
Color de brocha:
Blanco:a
Rojo: s
Azul: d
Amarillo: f
Negro: g
Color de puntos:
Blanco: z
Rojo: x
Azul: c
Amarillo: v
Negro: b
__________________________________________________
float[][] board; int maxCant; int c;
void setup() {
size(700, 700); background(20); strokeWeight(10); stroke(255, 3); strokeJoin(ROUND); c=0; maxCant = 10000; board = new float[maxCant][2]; smooth();
}
void draw() {
if (mousePressed) {
board[c][0]=mouseX;
board[c][1]=mouseY;
println(c);
c++;
}
for (int i = 0; i <= c; i++) {
point(board[i][0], board[i][1]);
}
}
void keyPressed() {
if (key == 'a') {
stroke(255, 3);
c=0;
}
if (key == 's') {
stroke(241, 71, 71, 3);
c=0;
}
if (key == 'd') {
stroke(107, 140, 246, 3);
c=0;
}
if (key == 'f') {
stroke(243, 247, 124, 3);
c=0;
}
if (key == 'g') {
stroke(10, 3);
c=0;
}
if (key == 'r') {
saveFrame("board-##.png");
}
if (key == 'e') {
background(10);
c=0;
}
if (key == 'w') {
background(245);
c=0;
}
if (key == 'z') {
stroke(255, 3);
}
if (key == 'x') {
stroke(241, 71, 71, 3);
}
if (key == 'c') {
stroke(107, 140, 246, 3);
}
if (key == 'v') {
stroke(243, 247, 124, 3);
}
if (key == 'b') {
stroke(10, 3);
}
}