Trabajo N° 6 pizarra

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ítulotrabajo N° 6 pizarra
Tipo de ProyectoProyecto de Taller
Palabras Clavetarea 6
Período2012-2012
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.
Alumno(s)Daniel Galaz
ProfesorHerbert Spencer

int c; float d; float grosor; float x=99; float y= 99; float speed= 9;

void setup () {

size (700, 700);
background(0);
smooth();
c= color(255);//color inicial del trazo, como lapiz grafito//

} void draw () {

move();
display();
if (mousePressed) {//trazo cuadrado, "pintar"//
  fill(c);
  stroke(c, 10);
  d =dist (mouseX, mouseY, pmouseX, pmouseY);
  grosor = map (d, 0, 10, 1, 100);
  strokeWeight (d); //grosor de la línea
  line(mouseX, mouseY, pmouseX, pmouseY);
  rect (mouseX, mouseY, 1, 1 );//pinta a cuadrados//
}
if (key=='q') {//trazo circular, "dibuja"//
  if (mousePressed) {
    fill(c);
    stroke(c);
    d =dist (mouseX, mouseY, pmouseX, pmouseY);
    grosor = map (d, 0, 10, 1, 100);
    strokeWeight (d); 
    strokeCap (PROJECT);
    line(mouseX, mouseY, pmouseX, pmouseY);
    ellipse (mouseX, mouseY, 1, 1 );
  }
}

} void move() {

x=x*speed;
if (x>width) {
  x=350;
}
y=y+20;
if (y<height) {
  y=20;
}

} void display() {

fill(c, 10);
triangle(x, y,40, 50, 10, 50);

} //BOTONES DE GRABAR Y COLORES//

void keyPressed() {

if (key == 'g') {
  saveFrame ("img/######.jpg");
}
if (key == 'b') { //borra todo
  background (0);
}
if (key=='c') {//borrador
  c=color(0);
}
if (key=='r') {
  c= color(#A50A0A, 100);//rojo
}
if (key=='v') {
  c=color(#255F25, 100);//verde
} 
if (key=='y') {
  c=color(#E9F200, 100);//amarillo
} 
if (key=='a') {
  c=color(#1000FF, 100);//azul
}
if (key=='w') {
  c=color(255);//blanco
}


}