Cesar Sanchez:ciclo for
De Casiopea
Título | César Sánchez: ciclo for |
---|---|
Tipo de Proyecto | Proyecto de Taller |
Palabras Clave | tarea 2 |
Período | 2013- |
Del Curso | Imagen Escrita 2013 - DIS, |
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. |
Profesor | Herbert Spencer |
float margen, xSpace, ySpace; int xElems, yElems; void setup() { size(500,500); margen = 0; xElems = 30; yElems = 31; calc(); mouseX = xElems; mouseY = yElems; } void draw() { background(0); xElems = (int) mouseX / 5; yElems = (int) mouseY / 6; calc(); for (float x = margen; x <= 490; x += xSpace){ for (float y = margen; y <= 450; y += ySpace+5){ stroke(#116750); fill(0,100,0); rect(x,y,1,5); } } } void calc() { xSpace = (width - 2) / (float)(xElems - 2); ySpace = (height - 1) / (float)(yElems - 1); }
</nowiki>