Catalina Angulo: tarea 4

De Casiopea
Catalina Angulo: tarea 4


TítuloCatalina Angulo: tarea 4
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 4
AsignaturaTaller Inicial 1ª y 2ª Etapa, Taller Inicial Común 1ª y 2ª Etapa, Imagen Escrita 2012,
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)Catalina Angulo
ProfesorHerbert Spencer
float d, grosor;

void setup () {
  size (screen.width, screen.height);//Pantalla Completa
  smooth ();//líneas suaves
  background (0);//fondo blanco
  stroke (200, 100);//trazo negro, con transparencia
  strokeCap (ROUND);//el final del trazo tiene forma redonda
}

void draw () {
  if (mousePressed) {
    d =dist (mouseX, mouseY, pmouseX, pmouseY);
    grosor = map (d, 0, 25, 1, 255);
    strokeWeight (4); //grosor de la línea
    line(mouseX, mouseY, pmouseX, pmouseY); //proyección de la línea
  }
}

void keyPressed () {
  if (key=='g') {//se presiona g y guarda el proyecto
    saveFrame ("img/######.jpg");
  }
  if (key =='b') {//borra el dibujo
    background (0);
  }
  if (key=='1') {//el trazo se torna color amarillo
    stroke (#F7FA5D, 100);
  }
  if (key=='2') {//el trazo se torna color rojo
    stroke(#E83717, 100);
  }
  if (key=='3') {//el trazo se torna color azul
    stroke(#1754E8, 100);
  }
  if (key=='4') {//el trazo se torna  color verde
    stroke(#17E827);
  }
  if (key=='5') {//el trazo se torna negro
    stroke(#E817DA);
  }
}