Gabriela Correa: Curva Matemática

De Casiopea
Revisión del 22:30 11 abr 2012 de Crisalys (discusión | contribs.) (Página creada con '{{Proyecto |Título=Gabriela Correa: Curva Matemática |Tipo de Proyecto=Proyecto de Curso |Palabras Clave=tarea 3 |Año de Inicio=2012 |Año de Término=2012 |Carreras Relacion...')
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)
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);
  }
}