Alejandra Andrades Thomas: curvas
| Título | Alejandra Andrades Thomas: Curvas |
|---|---|
| Tipo de Proyecto | Proyecto de Curso |
| Palabras Clave | tarea 3 |
| Período | 2012-2012 |
| Del Curso | Imagen Escrita 2012, |
| Carreras | Arquitectura |
| Alumno(s) | Alejandra Andrades Thomas |
| Profesor | Herbert Spencer |
float y, n;
float m;
void setup() {
size(700, 700);
}
void grilla(int divsX, int divsY) {
stroke(240);
float xSpacer = width/(float)divsX;
float ySpacer = height/(float)divsY;
for (float y = ySpacer; y < height; y +=ySpacer) {
line(0, y, width, y);
}
for (float x = xSpacer; x < width; x +=xSpacer) {
line(x, 0, x, height);
}
}
void cruz(float x, float y, float tam) {
float t = tam/2;
stroke(45, 50, 247, 70);
line(y-t, x-t, x+t, y+t);
line(x-t, y+t, x+t, y-t);
}
void draw() {
background(255);
grilla(40, 20);
for (int x = 0; x < width; x++) {
n = norm(x, 0, width);
m = map(mouseX, 0, width, 1, 40);
y = pow(n, m) * height;
cruz(x, y, 13);
cruz(x, height-y, 13);
}
println(m);
}