Pincel Tomás Bustos

De Casiopea
La versión para imprimir ya no se admite y puede contener errores de representación. Actualiza los marcadores del navegador y utiliza en su lugar la función de impresión predeterminada del navegador.






Título


TítuloPincel
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 4
Período2013-
AsignaturaImagen Escrita,
Del CursoImagen Escrita 2013 - ARQ,
CarrerasArquitectura
Alumno(s)Tomás Bustos
ProfesorHerbert Spencer


<nowiki>

int num = 9;
float i = TWO_PI / num; 
float r = 20;         
float x, y;            
int fondo = #FFFFFF;
int trazo = 0;
int tam = 50;

void setup() {
  size(500, 500);
  background(fondo);
  stroke(trazo, random(150, 120));
  frameRate(85);
}

void draw() {
  if (mousePressed == true) {
    strokeWeight(random(tam-50, tam+50));
    point(mouseX, mouseY); 
  }
}

void keyPressed() {
    if (key == '-') {  //Al apretar - se disminuye el tamaño del pincel en 1
    tam = tam - 1;
  }
  if (key == 'r' || key == 'R') {  //Al apretar R el trazo cambia de color a rojo
    stroke(255, 0, 0, random(50, 100));
  }
}

void keyReleased() {
  if (key == 'e' || key == 'E') {  // Al soltar E se vuelve al pincel normal.
    stroke(trazo, random(50, 100));
  }