int mw = 792; int mh = 1050; linea [] lineasArr; int currentLinea = 0; lineaGris [] lineasArrGris; int currentLineaGris = 0; int cuantasLineasGris = mw; int contador, contadorGris; BImage c; float xLogo, yLogo; void setup() { size(mw, mh); background(255, 255, 255); lineasArr = new linea[10000]; c = loadImage("logo2.jpg"); xLogo = (mw/2)-(c.width/2); yLogo = (mh/2)-(c.height/2); image(c, xLogo, yLogo); int cuantasColumnas = c.width; int cuantasFilas = c.height; int currentCol = 0; int currentFila = 0; for (int i=0; imw || y<0 || y>mh) fd++; else change(); } } void pintarLogo() { stroke(0,0,0); point(xInit, yInit); } void change() { r = getRadio(); dir = dir*-1; d = d-180; cx = x-(r*cos(radians(d))); cy = y-(r*sin(radians(d))); fd = int(random(90)); counter = 0; if (count>20) count-=10; } float getRadio() { float currentDist = distance(x, y, xLogo+(c.width/2), yInit+(c.height/2)); r = 5000; return r; } float distance(float x1, float y1, float x2, float y2) { return sqrt(sq(x1-x2) + sq(y1-y2)); } } class lineaGris { int id; float x; float xOld; float y, yOld; int r; int c = int(150); boolean pintar; lineaGris(int i) { id = i; x = random(mw); y = random(mh); xOld = x; yOld = y; } void pintar() { r= int(random(20)+10); if (id!=50 && id!=51) return; float r1 = random(360); float r2 = random(360); x = xOld+r*cos(r1); y = yOld+r*cos(r2); stroke(c, c, c); line(xOld, yOld, x, y); xOld = x; yOld = y; } }