Favio Matus Pizarra de líneas
De Casiopea
Título | Favio Lineas color |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 5 |
Del Curso | Imagen Escrita 2012, |
Carreras | 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. |
Alumno(s) | Favio Matus |
Profesor | Herbert Spencer |
float[][] coords; int maxPuntos; int c; int a=2; void setup() {
size(700, 700); c = 0; maxPuntos = 1000; coords = new float[maxPuntos][2]; strokeWeight(2); stroke(255); background(0);
}
void draw() {
if (mousePressed) { coords[c][0] = mouseX; coords[c][1] = mouseY; println(c); c ++; } for (int i = 0; i <= c; i++) { strokeWeight(a); point(coords[i][0], coords[i][1]);
if(mouseButton== RIGHT){
background(0); c=0;
} }
}
void connect1() {
for (int i = 0; i <= c; i++) { for (int j = 0; j < i; j++) { line(coords[i][0]+mouseX, coords[i][1]+second(), coords[j][0], coords[j][1]);
} } }
void keyPressed(){
if(key=='1'){
rect(50,50,500,500); background(0); stroke(#08A72C); connect1(); } if(key=='2'){ rect(50,50,500,500); background(0); stroke(#D8D218); connect1();
} if(key == '3'){
rect(50,50,500,500); background(0); stroke(#BC0909); connect1();
} if (key=='4'){
rect(50,50,500,500); background(0); stroke(#1629F0); connect1();
} if(key== '5'){
rect(50,50,500,500); background(0); stroke(#F0742C); connect1();
}
}