Constanza Hills curva tarea 3

De Casiopea


Dxjahsdjah.png


Título
Palabras Clavetarea 3
AsignaturaImagen Escrita 2012
CarrerasArquitectura
Alumno(s)Constanza Hills
ProfesorHerbert Spencer

float y,n; float m;

void setup (){

size (700,700);

}

void grilla (int divsX, int divsY){

stroke (#28BFA4);

float xSpacer = width/(float)divsX;
float ySpacer = height/(float) divsY;

for (float y= ySpacer; y< height; y+=ySpacer){

line (10,y,width,y);

} for (float x= xSpacer; x>width; x+=xSpacer){

line (x,10,x+5,height);

} } void cruz(float x, float tam, float y) {

float t = tam; 
stroke(#0CA3F2);
line(x+t, y+5, x+50, y*t);
line(x-t, y+t, x*t, y+t);

}

void draw (){

background (255);
grilla (40,40);

for(int x=0; x<width;x++){
  n= norm (x,10,height);
  m = map (mouseX,10,width,20,1);
  y=pow (n,m)*width;
  
  cruz (x,y,10);
  cruz (x,height-y,20);
}
println(m);}