├── Fibo ├── 0.png ├── 1.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 14.png ├── 15.png ├── 16.png ├── 17.png ├── 18.png ├── 19.png ├── 2.png ├── 20.png ├── 21.png ├── 22.png ├── 23.png ├── 24.png ├── 25.png ├── 26.png ├── 27.png ├── 28.png ├── 29.png ├── 3.png ├── 30.png ├── 31.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png └── Fibo.pde ├── Main ├── Main.pde └── base.png ├── README.md └── result.gif /Fibo/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/0.png -------------------------------------------------------------------------------- /Fibo/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/1.png -------------------------------------------------------------------------------- /Fibo/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/10.png -------------------------------------------------------------------------------- /Fibo/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/11.png -------------------------------------------------------------------------------- /Fibo/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/12.png -------------------------------------------------------------------------------- /Fibo/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/13.png -------------------------------------------------------------------------------- /Fibo/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/14.png -------------------------------------------------------------------------------- /Fibo/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/15.png -------------------------------------------------------------------------------- /Fibo/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/16.png -------------------------------------------------------------------------------- /Fibo/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/17.png -------------------------------------------------------------------------------- /Fibo/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/18.png -------------------------------------------------------------------------------- /Fibo/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/19.png -------------------------------------------------------------------------------- /Fibo/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/2.png -------------------------------------------------------------------------------- /Fibo/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/20.png -------------------------------------------------------------------------------- /Fibo/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/21.png -------------------------------------------------------------------------------- /Fibo/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/22.png -------------------------------------------------------------------------------- /Fibo/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/23.png -------------------------------------------------------------------------------- /Fibo/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/24.png -------------------------------------------------------------------------------- /Fibo/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/25.png -------------------------------------------------------------------------------- /Fibo/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/26.png -------------------------------------------------------------------------------- /Fibo/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/27.png -------------------------------------------------------------------------------- /Fibo/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/28.png -------------------------------------------------------------------------------- /Fibo/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/29.png -------------------------------------------------------------------------------- /Fibo/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/3.png -------------------------------------------------------------------------------- /Fibo/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/30.png -------------------------------------------------------------------------------- /Fibo/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/31.png -------------------------------------------------------------------------------- /Fibo/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/4.png -------------------------------------------------------------------------------- /Fibo/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/5.png -------------------------------------------------------------------------------- /Fibo/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/6.png -------------------------------------------------------------------------------- /Fibo/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/7.png -------------------------------------------------------------------------------- /Fibo/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/8.png -------------------------------------------------------------------------------- /Fibo/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vamoss/creativecoding-poster/4f42de3a24194d6e16322bcf91a48e6db6e3a568/Fibo/9.png -------------------------------------------------------------------------------- /Fibo/Fibo.pde: -------------------------------------------------------------------------------- 1 | int total = 32;//images 2 | int totalFrames = total*2-2; 3 | int space = totalFrames/6; 4 | PImage[] images = new PImage[total]; 5 | int[] frames = new int[totalFrames]; 6 | void setup() { 7 | size(565, 800); 8 | background(0); 9 | 10 | for(int i=0; i0; i--){ 19 | frames[counter] = i; 20 | counter++; 21 | } 22 | frameRate(3); 23 | } 24 | 25 | void draw(){ 26 | rotate(PI/2); 27 | image(images[frames[(frameCount+0*space) % frames.length]], 400, -565, 400, 565); 28 | 29 | rotate(PI/2); 30 | image(images[frames[(frameCount+1*space) % frames.length]], -282, -400, 282, 400); 31 | 32 | rotate(PI/2); 33 | image(images[frames[(frameCount+2*space) % frames.length]], -200, 282, 200, 282); 34 | 35 | rotate(PI/2); 36 | image(images[frames[(frameCount+3*space) % frames.length]], 423, 200, 141, 200); 37 | 38 | rotate(PI/2); 39 | image(images[frames[(frameCount+4*space) % frames.length]], 300, -423, 100, 141); 40 | 41 | rotate(PI/2); 42 | image(images[frames[(frameCount+5*space) % frames.length]], -352, -300, 70, 100); 43 | 44 | saveFrame("frame"+frameCount+".tiff"); 45 | if(frameCount==frames.length) exit(); 46 | } 47 | -------------------------------------------------------------------------------- /Main/Main.pde: -------------------------------------------------------------------------------- 1 | /* OpenProcessing Tweak of *@*http://www.openprocessing.org/sketch/64754*@* */ 2 | /* !do not delete the line above, required for linking your tweak if you upload again */ 3 | // Pierre MARZIN 4 | // Trying to learn Processing... First project, much inspired by "Mycelium" by Scloopy? 5 | // http://marzinp.free.fr/applets 6 | 7 | //GUI and Drag 'n drop: great libraries ! Thanks to Andreas Schlegel (http://www.sojamo.de/libraries/index.html) 8 | //GUI variables 9 | //SDrop drop; 10 | public String mUrl; 11 | import processing.pdf.*; 12 | 13 | 14 | /* @pjs preload="base.png"; */ 15 | int counter = 0; 16 | PImage source; // Source image 17 | //for each "worm", variables: position 18 | 19 | //aimed direction 20 | PVector vise=new PVector(); 21 | int locPixel; 22 | ArrayList seekersArray; 23 | float seekX,seekY; 24 | //worm's length 25 | int maxLength; 26 | int maxLayers; 27 | //like pixels[], to keep track of how many times a point is reached by a worm 28 | int [] buffer; 29 | int [] limiteDown; 30 | //number of worms at the beginning 31 | int nbePoints; 32 | public float inertia; 33 | //width and length of the drawing area 34 | int larg; 35 | int haut; 36 | int largI; 37 | int hautI; 38 | //brightness of the destination pixel 39 | float briMax; 40 | //minimum brightness threshold 41 | public int seuilBrillanceMini; 42 | //maximum brightness threshold 43 | public int seuilBrillanceMaxi; 44 | //location of the tested point in pixels[] 45 | int locTest; 46 | int locTaX; 47 | int locTaY; 48 | int brightnessTemp; 49 | //around a point (worms position), how many pixels will we look at... 50 | int amplitudeTest; 51 | //constrain the acceleration vector into a devMax radius circle 52 | float devMax; 53 | //constrain the speed vector into a vMax radius circle 54 | float vMax; 55 | //not used:random factor 56 | int hasard; 57 | //stroke's weight (slider) or radius of ellipse used for drawing 58 | public float myweight; 59 | //draw or not (button onOffButton) 60 | public boolean dessine=true; 61 | //different drawing options 62 | public int modeCouleur; 63 | //fill color 64 | int macouleur; 65 | boolean limite; 66 | 67 | //setup only sets up what won't change:GUI and window params 68 | //I use initialiser() to set up what has to be initialised 69 | //when you hit "ResetButton" and dessin() to set the drawing parameters 70 | void setup() { 71 | larg=largI=842; 72 | haut=hautI=1192; 73 | 74 | size(842,1192); 75 | beginRecord(PDF, "everything.pdf"); 76 | //sound useSound=false; 77 | limite=false; 78 | //sound minim = new Minim(this); 79 | //drop = new SDrop(this); 80 | // f = loadFont("ArialUnicodeMS-12.vlw"); 81 | source = loadImage("base.png"); 82 | if(hautI*source.width>largI*source.height){ 83 | larg=largI; 84 | haut=larg*source.height/source.width; 85 | }else{ 86 | haut=hautI; 87 | larg=haut*source.width/source.height; 88 | } 89 | source.resize(larg,haut); 90 | source.loadPixels(); 91 | fill(0); 92 | initialiser(); 93 | } 94 | 95 | //launched after setup and any time you hit the ResetButton button 96 | public void initialiser() { 97 | dessine=true; 98 | nbePoints=6; 99 | fill( 0 ); 100 | stroke( 0 ); 101 | rect( 0, 0, larg,haut ); 102 | buffer=new int[haut*larg]; 103 | smooth(); 104 | inertia=6; 105 | maxLayers=10; 106 | myweight=.2; 107 | seuilBrillanceMaxi=200; 108 | seuilBrillanceMini=0; 109 | amplitudeTest=1; 110 | maxLength=300; 111 | limite=true; 112 | hasard=0; 113 | devMax=8; 114 | vMax=50; 115 | modeCouleur=1; 116 | strokeJoin(ROUND); 117 | seekersArray=new ArrayList (); 118 | 119 | for(int i=0;iseuilBrillanceMaxi)||(brightness(mSeeker.getImgPixel()) 0) && (locTaY > 0) && (locTaX < larg - 1) && (locTaY < haut - 1)) { 187 | brightnessTemp = int(brightness(source.pixels[locTaX + larg * locTaY])); 188 | vise.sub(new PVector(i * brightnessTemp, j * brightnessTemp)); 189 | } 190 | } 191 | } 192 | // coeur du comportement de seeker: 193 | // core of the behaviour of the seeker (http://www.shiffman.net/ see 194 | // wanderer's code) 195 | 196 | vise.normalize(); 197 | vise.mult(100f/mySeeker.inertia); 198 | mySeeker.getV().add(new PVector(vise.x,vise.y)); 199 | PVector deviation = mySeeker.getV().get(); 200 | deviation.normalize(); 201 | deviation.mult(devMax); 202 | mySeeker.getV().normalize(); 203 | mySeeker.getV().mult(vMax); 204 | mySeeker.getP().add(deviation); 205 | // ******************different cases that lead to move the seeker to 206 | // another random place************** 207 | // outside window 208 | // on compte les segments de chaque ver 209 | // worm's length is increased 210 | mySeeker.setLongueur(mySeeker.getLongueur() + 1); 211 | float positionBrightness=brightness(mySeeker.getImgPixel()); 212 | //println(positionBrightness+" "+mySeeker.getP().x+" "+mySeeker.getP().y); 213 | //dessine=false; 214 | // si c'est trop long on demenage 215 | // seeker's moved if worm's too long 216 | if (mySeeker.getLongueur() > maxLength) { 217 | deplacePoint(mySeeker); 218 | } 219 | if ((mySeeker.getP().x < 1) || (mySeeker.getP().y < 1) || (mySeeker.getP().x > larg - 1) || (mySeeker.getP().y > haut - 1))// || 220 | { 221 | mySeeker.setDeplace(true); 222 | deplacePoint(mySeeker); 223 | return; 224 | } 225 | // buffer est une copie vide de l'image. on l'augmente pour chaque point 226 | // parcouru 227 | // buffer is an empty copy of the source image. It's increased every 228 | // time a point is reached. 229 | buffer[pixelsPosition]++; 230 | // si on est passe plus de n fois on demenage le point 231 | // If a point is reached n times, seeker is moved 232 | if (buffer[pixelsPosition] > maxLayers) { 233 | deplacePoint(mySeeker); 234 | } 235 | 236 | // inside window, limite on and inside value range 237 | if ((limite) && (positionBrightness <= seuilBrillanceMaxi) && (positionBrightness >= seuilBrillanceMini)) { 238 | if (mySeeker.getLimiteDown() != 0) { 239 | mySeeker.setLimiteDown(mySeeker.getLimiteDown() - 2); 240 | } 241 | } 242 | // limite on and outside value range 243 | if ((limite) && ((positionBrightness > seuilBrillanceMaxi) || (positionBrightness < seuilBrillanceMini))) { 244 | if (mySeeker.getLimiteDown() == 0) { 245 | mySeeker.setLimiteDown(2); 246 | } 247 | mySeeker.setLimiteDown(mySeeker.getLimiteDown() + 4);// print(mySeeker.limiteDown+" "); 248 | if (mySeeker.getLimiteDown() >= 152 / myweight) { 249 | mySeeker.setLimiteDown(0); 250 | deplacePoint(mySeeker); 251 | } 252 | } 253 | // null deviation 254 | if ((deviation.x == 0) && (deviation.y == 0)) { 255 | mySeeker.setLimiteDown(0); 256 | deplacePoint(mySeeker); 257 | } 258 | else briMax = brightness(source.pixels[pixelsPosition]); 259 | 260 | // go draw the seeker's shape 261 | mySeeker.setDia((float) (myweight * (1 - cos((mySeeker.getLongueur()) * PI * 2 / (float) maxLength)))); 262 | mySeeker.setAlpha((max(0, (round(127 * mySeeker.getDia() / myweight) - (int) briMax / 2)))); 263 | float r = red(mySeeker.getImgPixel()); 264 | float g = green(mySeeker.getImgPixel()); 265 | float b = blue(mySeeker.getImgPixel()); 266 | 267 | stroke(0); 268 | strokeWeight(mySeeker.getDia()*3+5); 269 | line(seekX,seekY,mySeeker.getP().x,mySeeker.getP().y); 270 | 271 | stroke(r, g, b, brightness(mySeeker.getImgPixel())+100); 272 | strokeWeight(mySeeker.getDia()*3+3); 273 | line(seekX,seekY,mySeeker.getP().x,mySeeker.getP().y); 274 | //println("Size "+mySeeker.getDia()); 275 | // on cree un nouveau vers de temps en temps (on pourrait tester selon 276 | // la brilance de la zone...) 277 | // from times to times a new worm is created 278 | if (random(1) > 1 - (255 - briMax) / (500 * seekersArray.size())) { 279 | seekersArray.add(new Seeker(new PVector(seekX, seekY), new PVector(mySeeker.getV().x * random(-3,3), mySeeker.getV().x 280 | * random(-3,3)), inertia)); 281 | nbePoints++; 282 | // Log.d("DrawingView","Size "+seekersArray.size()); 283 | } 284 | } 285 | 286 | // *****************move the seeker function*************************** 287 | void deplacePoint(Seeker seeker) { 288 | seeker.setLongueur(0); 289 | seeker.setP(random(1, larg - 1), random(1, haut - 1)); 290 | while ((brightness(seeker.getImgPixel()) > seuilBrillanceMaxi) 291 | || (brightness(seeker.getImgPixel()) < seuilBrillanceMini)) { 292 | seeker.setP(random(1, larg - 1), random(1, haut - 1)); 293 | } 294 | seekX = seeker.getP().x; 295 | seekY = seeker.getP().y; 296 | } 297 | public void setDevMax(float devMax) { 298 | this.devMax = devMax; 299 | } 300 | public class Seeker { 301 | 302 | // position 303 | private PVector p = new PVector(); 304 | // speed 305 | private PVector v = new PVector(); 306 | private int imgPixel; 307 | private float inertia; 308 | // worm's length 309 | private float longueur; 310 | // worm's limite 311 | private int limiteDown; 312 | private int couleur; 313 | private int red = int(random(0, 100)); 314 | // stroke weight 315 | private float dia; 316 | private boolean deplace; 317 | private int alpha; 318 | private float greenfade = random(1); 319 | private float bluefade = random(1); 320 | private float redfade = random(1); 321 | private float vegRatio = random(.75, 1); 322 | 323 | // Constructor 324 | public Seeker(PVector P, PVector V, float Inertia) { 325 | p = P; 326 | v = V; 327 | limiteDown = 0; 328 | longueur = 0; 329 | setInertia(random(-2, 2) + Inertia); 330 | setDeplace(false); 331 | } 332 | 333 | public int updateCouleur() { 334 | 335 | float green = green(couleur); 336 | float blue = blue(couleur); 337 | // if (view.getStyle() == DrawingView.STYLE_VEGETAL) { 338 | // if ((green > 150) || (green < 1)) 339 | // greenfade = -greenfade; 340 | // green += greenfade; 341 | // if ((blue > 50) || (blue < 1)) 342 | // bluefade = -bluefade; 343 | // blue += bluefade; 344 | // if ((red > 50) || (red < 1)) 345 | // redfade = -redfade; 346 | // red += redfade; 347 | // couleur = Color.argb(alpha, red, green, blue); 348 | // } else if (view.getStyle() == DrawingView.STYLE_NORMAL) { 349 | if ((green > 100) || (green < 1)) 350 | greenfade = -greenfade; 351 | green += greenfade; 352 | if ((blue > 100) || (blue < 1)) 353 | bluefade = -bluefade; 354 | blue += bluefade; 355 | couleur =color(alpha, red, green, blue); 356 | // } 357 | // else if (view.getStyle() == DrawingView.STYLE_NEGATIF) { 358 | // couleur = Color.WHITE; 359 | // } 360 | return couleur; 361 | } 362 | 363 | public float getLongueur() { 364 | return longueur; 365 | } 366 | 367 | public void setLongueur(float longueur) { 368 | this.longueur = longueur; 369 | } 370 | 371 | public PVector getP() { 372 | return p; 373 | } 374 | 375 | public void setP(PVector p) { 376 | this.p = p; 377 | } 378 | 379 | public void setP(float a, float b) { 380 | this.p.x = a; 381 | this.p.y = b; 382 | } 383 | 384 | public PVector getV() { 385 | return v; 386 | } 387 | 388 | public void setV(PVector v) { 389 | this.v = v; 390 | } 391 | 392 | public void setV(float a, float b) { 393 | this.v.x = a; 394 | this.v.y = b; 395 | } 396 | 397 | public int getLimiteDown() { 398 | return limiteDown; 399 | } 400 | 401 | public void setLimiteDown(int limiteDown) { 402 | this.limiteDown = limiteDown; 403 | } 404 | 405 | public boolean isDeplace() { 406 | return deplace; 407 | } 408 | 409 | public void setDeplace(boolean deplace) { 410 | this.deplace = deplace; 411 | } 412 | 413 | public float getDia() { 414 | return dia; 415 | } 416 | 417 | public void setDia(float dia) { 418 | this.dia = dia; 419 | } 420 | 421 | public int getAlpha() { 422 | return alpha; 423 | } 424 | 425 | public void setAlpha(int alpha) { 426 | this.alpha = alpha; 427 | } 428 | 429 | public float getInertia() { 430 | return inertia; 431 | } 432 | public void setInertia(float inertia) { 433 | this.inertia = inertia; 434 | } 435 | 436 | 437 | public int getCouleur() { 438 | return couleur; 439 | } 440 | 441 | public void setCouleur(int couleur) { 442 | this.couleur = couleur; 443 | } 444 | 445 | public float getVegRatio() { 446 | return vegRatio; 447 | } 448 | 449 | public void setVegRatio(float vegRatio) { 450 | this.vegRatio = vegRatio; 451 | } 452 | public int getImgPixel(){ 453 | if(getP().x>0 && getP().x0 && getP().y