int ancho=400,alto=300; FloatMatriz actual=new FloatMatriz(ancho,alto); FloatMatriz anterior=new FloatMatriz(ancho,alto); float relacion_con_la_vecindad(FloatMatriz ante, boolean mouseClick){ float valor; //-------------------------------------------------------------------------------------------------------------------------------- // INICIO de codigo a modificar - INICIO de codigo a modificar - INICIO de codigo a modificar - INICIO de codigo a modificar - //-------------------------------------------------------------------------------------------------------------------------------- valor = min(max(ante.n(),ante.s()),max(ante.e(),ante.o()))+3; valor = (valor > 250 ? random(140) : valor); //-------------------------------------------------------------------------------------------------------------------------------- // FIN de codigo a modificar - FIN de codigo a modificar - FIN de codigo a modificar - FIN de codigo a modificar - //-------------------------------------------------------------------------------------------------------------------------------- return valor; } void setup(){ size(800,600); actual.iniciarAzar(0,255); noStroke(); //framerate(2); } void loop(){ float pasoAncho = width/ancho; float pasoAlto = height/alto; for(int i=0;i0){ return this.read(px,py-1); }else{ return this.read(px,fil-1); } } float s(){ if(py0){ return this.read(px-1,py); }else{ return this.read(col-1,py); } } float e(){ if(px0){ if(px>0){ return this.read(px-1,py-1); }else{ return this.read(col-1,py-1); } }else{ if(px>0){ return this.read(px-1,fil-1); }else{ return this.read(col-1,fil-1); } } } float ne(){ if(py>0){ if(px0){ return this.read(px-1,py+1); }else{ return this.read(col-1,py+1); } }else{ if(px>0){ return this.read(px-1,0); }else{ return this.read(col-1,0); } } } float se(){ if(py