Daniel Galaz trabajo N° 4 pizarra

De Casiopea


Títulotrabajo N° 4 pizarra
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 4
Período2012-
AsignaturaImagen Escrita 2012,
Del CursoImagen Escrita 2012,
CarrerasArquitectura, 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., 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.
ProfesorHerbert Spencer

float d, grosor; // distancia y grosor

void setup() {

 size(screen.width, screen.height); //pantalla completa
 smooth(); // suavizado (anti-alisaing)
 background(#09E307); // fondo negro
 stroke(0, 100);
 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, 0, 100, 1, 20);
   strokeWeight(5); // strokeWeight(grosor)
   line(mouseX, mouseY, pmouseX, pmouseY);
   line(mouseX+5, mouseY+5, pmouseX+5, pmouseY+5);
 }

}

void keyPressed() {

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