Gabriela Torres: curva en gráfico
De Casiopea
Título | |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 3 |
Del Curso | Imagen Escrita 2012, |
Carreras | Arquitectura |
Alumno(s) | Gabriela Torres |
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/6; stroke(#00c0ff); line(x, y+2, x+x, x); stroke (#ff3f00); line(y, x, x, y); } void draw() { background(255); grilla(60, 60); for (int x = 0; x < width; x++) { n = norm(x, 0, width); m = map(mouseX, 0, width, 1, 60); y = pow(n, m) * height; cruz(x,y*4,y); cruz(x/2, height-y, x); } println(m); }