Paul Guitard: Paint - Array

De Casiopea
Revisión del 02:03 31 may 2012 de Kaikobayashi (discusión | contribs.)
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)
Pizarra - Paint Con Array


TítuloPizarra - Paint Con Array
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 5
Período2012-
AsignaturaTaller Inicial Común 1ª y 2ª Etapa,
Del CursoImagen Escrita 2012,
CarrerasDiseñ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., Diseño Industrial"Diseño Industrial" is not in the list (Arquitectura, Diseño, Magíster, Otra) of allowed values for the "Carreras Relacionadas" property.
Alumno(s)Paul Guitard
ProfesorHerbert Spencer

float[][] board; int maxCant; int c;

void setup() {

 size(700, 700);
 background(255);
 strokeWeight(10);
 stroke(0);
 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);
 }
}