Gabriela Correa: Curva Matemática

De Casiopea
La versión para imprimir ya no se admite y puede contener errores de representación. Actualiza los marcadores del navegador y utiliza en su lugar la función de impresión predeterminada del navegador.
Archivo:Curva matemática screenshot.png
Gabriela Correa: Curva Matemática


TítuloGabriela Correa: Curva Matemática
Tipo de ProyectoProyecto de Curso
Palabras Clavetarea 3
Período2012-2012
Del CursoImagen Escrita 2012,
CarrerasDiseñ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)Gabriela Correa
ProfesorHerbert Spencer
 
float y, n;  
float m;

void setup() {
  size(700, 700);
}

void res(float x, float y, float tam) { 
  stroke(60, 20, 180, 100);
  line(x, y-x, x, y+x);
}

void draw() {
  background(150, 60, 80);

  for (int x = 0; x < width; x++) {

    n = norm(x, 0, width);
    m = map(mouseX, 0, width, 0, 5);
    y = pow(n, m) * height;
 
    res(x, y, 5);
    res(x, height-y, 5);
  }
}