Paul Guitard: Curva
De Casiopea
Título | Curva Funcion |
---|---|
Tipo de Proyecto | Proyecto de Curso |
Palabras Clave | tarea 3 |
Período | 2012- |
Asignatura | Taller Inicial Común 1ª y 2ª Etapa, |
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) | Paul Guitard |
Profesor | Herbert Spencer |
float y, n; float m; void setup() { size(700, 700); } void grilla(int divsX, int divsY) { stroke(255); 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; stroke(240, 20, 20, 50); line(x-t, y-t, x+t, y+t); line(x-t, y+t, x+t, y-t); } void draw() { background(0); grilla(2, 2); for (int x = 0; x < mouseX; x++) { n = norm(x, 0, width); m = map(mouseX, 0, width, 1, 40); y = pow(n, m) * height; cruz(x, 0, 50); cruz(x, height-y, 50); } }