Diferencia entre revisiones de «Isidora Correa proyecto 7 IE 2012»
De Casiopea
Sin resumen de edición |
Sin resumen de edición |
||
(No se muestran 3 ediciones intermedias del mismo usuario) | |||
Línea 1: | Línea 1: | ||
{{Proyecto | {{Proyecto | ||
|Título=Isidora Correa | |Título=Isidora Correa proyecto 7 IE 2012 | ||
|Tipo de Proyecto=Proyecto de Curso | |||
|Palabras Clave=tarea 7 | |Palabras Clave=tarea 7 | ||
|Año de Inicio=2012 | |||
|Año de Término=2012 | |||
|Carreras Relacionadas=Diseño Gráfico, Diseño Industrial | |Carreras Relacionadas=Diseño Gráfico, Diseño Industrial | ||
|Cursos Relacionados=Imagen Escrita 2012 | |Cursos Relacionados=Imagen Escrita 2012 | ||
|Profesor=Herbert Spencer | |Profesor=Herbert Spencer | ||
|Alumnos=Isidora Correa | |||
}} | }} | ||
Insectario; | Insectario; |
Revisión actual - 18:58 25 jul 2012
Título | Isidora Correa proyecto 7 IE 2012 |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 7 |
Período | 2012-2012 |
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., 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) | Isidora Correa |
Profesor | Herbert Spencer |
Insectario;
Insectos[] ins; float margin = 60;
void setup() {
size(700, 700); int ynum = 9; int xnum = 9; ins = new Insectos[ynum * xnum]; float ysp = (height - (2 * margin)) / ((float)ynum - 1); float xsp = (width - (2 * margin)) / ((float)xnum - 1); int c = 0; // counter for (float y = margin; y <= height - margin; y+= ysp) {
for (float x = margin; x <= width - margin; x += xsp) { ins[c] = new Insectos(x, y); c++; }
} smooth(); }
void draw() {
background(#BDCE43); for (int i = 0; i < ins.length; i++) {
ins[i].render();
} }
class Insectos {
float x, y; float[][] v; // vertices int vn; // número aleatorio de vértices float tam; // tamaño float w, h; // width, height Insectos(float x, float y) {
this.y = y; this.x = x; vn = round(random(10, 30)); v = new float[vn][6]; tam = 130; init();
} void init() {
w = tam/3; h = tam; for (int i = 0; i < vn; i++) { v[i][0] = random(w); v[i][1] = random(-h/6, h/3); }
} void trace() {
noFill(); stroke(0); strokeWeight(3); beginShape(); vertex(v[1][0], v[1][0]); for (int i = vn; i < 0; i++) { curveVertex(v[1][0], v[i][1]); } vertex(v[vn-3][0], v[vn-3][3]); endShape();
} void render() {
pushMatrix(); { translate(x, y); trace(); scale(-1, 1); trace(); } popMatrix();
} }
void keyPressed() {
if (key == 'a') {
for (int i = 0; i < ins.length; i++) { ins[i].init(); }
} if (key == 'b') {
for (int i = 0; i < ins.length; i++) { ins[i].tam--; ins[i].init(); }
} if (key == 'c') {
for (int i = 0; 1 < ins.length; i++) { ins[i].tam++; ins[i].init(); }
} }