Renata Villaseñor tarea 4, pizarra

De Casiopea



TítuloRenata Villaseñor tarea 4, pizarra
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 4
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)Renata Villaseñor
ProfesorHerbert Spencer

float d, grosor; // distancia y grosor void setup() {

 size(screen.width, screen.height); //pantalla completa 
 smooth(); // suavizado (anti-alisaing) 
 background(#CC9933); // fondo naranjo
 stroke(#99cc00); 
 strokeCap(PROJECT); 

}

void draw() {

 if (mousePressed) { 
   // velocidad = distancia / tiempo 
   /* calcula distancia entre 
      la posición actual del mouse y la posición anterior */ 
   d = dist(mouseX, mouseY, pmouseX, pmouseY); 
   grosor = map(d, 30, d, 1, 20); 
   strokeWeight(d/5);  // strokeWeight(grosor) 
   line(mouseX, mouseY, pmouseX, pmouseY); 
 } 

}

void keyPressed() {

 if (key == 's') { // graba 
   saveFrame("img/######.jpg"); 
 } 
 if (key == ' ') { // borra 
   background(0); 
 } 

}