1. //splitCenter_141013a

     
  2. //vapor_141013b

     
  3. //vapor_141013b

    boolean record = false;

    ArrayList<PointPosition> pointPosition = new ArrayList();
    boolean alternate = false;
    int threshold = 135;
    int height = 700;
    int width = 500;
    color pColor;
    int[] directions = {
      (width*-1)-1,
      (width*-1)+1,
      width+1,
      width-1
    };

    void setup(){
      background(0);
      size(width,height);
      startScatter(width/10);
    }

    void draw(){
      if (frameCount % 144 == 0) {
        pColor = color(
                  red(int(map(randomNormal(),0,1,0,135))),
                  green(int(map(randomNormal(),0,1,0,135))),
                  blue(int(map(randomNormal(),0,1,0,135)))
                 );
      }
      fill(pColor,2);
      stroke(pColor,10);
      rect(-2,-2,width+2,height+2);
      int i = 0;
      for(PointPosition p:pointPosition){
        threshold = setThreshold(threshold,153,255);
        p.tpos.x = p.tpos.x+sin(i/TAU)*i*TAU;//width/3;//sin(threshold);
        p.tpos.y = p.tpos.y+cos(i/TAU)*i*TAU;//width/3;//cos(threshold+p.pos.x);
        p.update();
        p.render();
        if (p.pos.x < 0 || p.pos.x > width) {
          p.pos.x = width/2;
          p.pos.y = height/2;
          p.tpos.x = width/2 + cos(i);
          p.tpos.y = height/2 + sin(i);
        }
        if (p.pos.y < 0 || p.pos.y > height) {
          p.pos.x = width/2;
          p.pos.y = height/2;
          p.tpos.x = width/2 + cos(i);
          p.tpos.y = height/2 + sin(i);
        }
        i++;
      }
      alterPixels();
    }

    int setThreshold(int threshold, int minThreshold, int maxThreshold) {
      if (threshold <= maxThreshold && threshold >= minThreshold && alternate) {
        threshold++;
      } else if (threshold <= maxThreshold && threshold >= minThreshold) {
        threshold—;
      } else if (alternate) {
        threshold = maxThreshold;
        alternate = !alternate;
      } else {
        threshold = minThreshold;
        alternate = !alternate;
      }
      return threshold;
    }


    void alterPixels(){
      loadPixels();
        for (int k=width+1; k<pixels.length-width-1; k++) {
          int pModifier = selectRandom(directions);
          if (brightness(pixels[k]) == threshold) {
            pixels[k] = pixels[k] « 24;
            pixels[k] = pixels[k] » 1;
          } else if (brightness(pixels[k]) > threshold) {
            pixels[k] = pixels[k+pModifier];
          } else {
            //
          }
        }
      updatePixels();
      threshold = setThreshold(threshold,2,254);
    }

    void startScatter(int count){
      for (int i=0; i<count; i++) {
        PointPosition p = new PointPosition();
          p.pos.x = width/2;
          p.pos.y = height/2;
          p.tpos.x = width/2 + cos(i);
          p.tpos.y = height/2 + sin(i);
        pointPosition.add(p);
      }
    }

    int selectRandom(int[] cases){
      int selected = int(random(cases.length));
      int output = cases[selected];
      return output;
    }

    class PointPosition {
      PVector pos = new PVector();
      PVector tpos = new PVector();
      void update(){
        pos.lerp(tpos,0.00001);
      }
      void render(){
        stroke(0);
        point(pos.x,pos.y);
      }
    }


    float randomNormal() {
      float x = 1.0, y = 1.0, s = 2.0;
      while (s >= 1.0) {
        x = random(-1.0f, 1.0f);
        y = random(-1.0f, 1.0f);
        s = x*x + y*y;
      }
      return x * sqrt(-2.0f * log(s)/s);
    }

     
  4. echophon:

    echophon:

    Swooning over polar coordinates 

    One year ago - 10/17/13, I created my first GIF.  This is the first one I posted & the second one ended up on radar.  This last year has been crazy fun. I’ve had my work featured IRL.  I’ve learned that there’s still a ton of things to learn!  And most of all, I’ve met so many amazing people who have encouraged and inspired me.  All of this, from Tumblr.

    Special Thanks to:

    praystation - The master.  Joshua Davis has been doing creative coding before we had a term for it.  I’ve learned a ton from using his framework.  Watch this to see his inspiration at work.  

    gnumblr - Slater was the first person to msg me and is an all around great GIF guy!  Good luck on your Tumblr ambassadorship!

    cindysuen - Cindy’s supercute art always picks me up.  I lost a cat earlier this year and her Cat GIFs helped me grieve.

    staff - Did you know real people make Tumblr?  I won’t call them out, but I’ve definitely felt the love from some of them.  

    omggifpop - One of these days I’ll get that 10 frame GIF ready for printing.  

    admiralpotato - So very helpful.  I need to sit down and learn some Blender.  He posted a tutorial that looks very helpful. 

    enchantedconsole - Collaborations were had, I learned some new techniques!  

    bigblueboo - Still trying to figure out some of these!  Playful craftsmanship at work.

    tracerstar - made a bunch of improvements to HYPE Framework that make it easier for me to make my art.

    prostheticknowledge / notational - always have something exciting on the arts/technology front.

    beesandbombs / p5art / forgethowtotalk - always posting code examples - great resources if you want to learn Processing. 

    adamferriss / vincemckelvie / heathwest - my jaw drops everytime they post.  Next level.

    benvancitters / kimpimmel - Seattle locals who have opened my eyes to the local creative scene.

    And to all the others…  thanks for the encouragement!  You’ll find these people and more on my reblog blog - echophlogs

    I look forward to the next year and the things it brings!

    Thanks dude : )

     
  5. //splitCenter_141012a

     
  6. //unwinding_141011d

     
  7. //splitCenter_141012c

     
  8. //unwinding_141011b

    ArrayList<PointPosition> pointPosition = new ArrayList();
    int threshold = 135;
    boolean alternate = true;
    int width = 500,
        height = 700;
    int[] directions = {
      (width*-1)-1,
      (width*-1)+1,
      width+1,
      width-1
    };

    void setup() {
      size(width,height);
      frameRate(24);
      startScatter();
      seedColor();
    }

    void draw() {
      fill(0,10);
      rect(-2,-2,width+2,height+2);
      startScatter();
      alterPixels();
      int i = 0;
      for(PointPosition p:pointPosition){
        i++;
        p.tpos.x = width/2 + sin(i * TWO_PI / (TAU / 24)) * i;
        p.tpos.y = height/2 + cos(i * TWO_PI / (TAU / 24)) * i;
        p.update();
        if (p.pos.x > width || p.pos.x < 0) {
          p.tpos.x = width/2;
        }
        if (p.pos.y > height || p.pos.y < 0) {
          p.tpos.y = height/2;
        }
        stroke(255-threshold);
        fill(255-threshold);
        p.render();
      }
    }

    void alterPixels() {
      loadPixels();
        for (int k=width+1; k<width*height-width-1; k++){
          int pModifier = directions[int(random(directions.length))];
          if (brightness(pixels[k]) < threshold){
            pixels[k-1] = color(
              int(red(pixels[k+width])),
              int(green(pixels[k+width])),
              int(blue(pixels[k+width])),
              int(brightness(pixels[k-width]))
            );
          } else if (brightness(pixels[k]) == threshold) {
            pixels[k] = pixels[k+pModifier];
          } else {
            pixels[k-width] = color(
              int(red(pixels[k+1])),
              int(green(pixels[k-1])),
              int(blue(pixels[k+width])),
              int(brightness(pixels[k-1]))
            );
          }
        }
      updatePixels();
      threshold = setThreshold(threshold,50,153);
    }

    int setThreshold(int threshold, int minThreshold, int maxThreshold) {
      if (threshold <= maxThreshold && threshold >= minThreshold && alternate) {
        threshold++;
      } else if (threshold <= maxThreshold && threshold >= minThreshold) {
        threshold—;
      } else if (alternate) {
        threshold = maxThreshold;
        alternate = !alternate;
      } else {
        threshold = minThreshold;
        alternate = !alternate;
      }
      return threshold;
    }

    void seedColor() {
      loadPixels();
        for (int k=0; k<width*height; k++) {
          pixels[k] = color(
                        red(int(map(k,0,1,0,255))),
                        green(int(map(k,0,1,0,255))),
                        blue(int(map(k,0,1,0,255))),
                        alpha(int(map(k,0,1,0,255)))
                        );
        }
      updatePixels();
    }

    void startScatter(){
      for (int i=0; i<width/10; i++) {
        PointPosition p = new PointPosition();
          p.pos.x = width/2;
          p.pos.y = height/2;
          p.tpos.x = width/2 + sin(i*TAU/(TAU/22)) * i;
          p.tpos.y = height/2 + cos(i*TAU/(TAU/22)) * i;
        pointPosition.add(p);
      }
    }

    class PointPosition {
      PVector pos = new PVector();
      PVector tpos = new PVector();
      void update(){
        pos.lerp(tpos,0.0001);
      }
      void render(){
        point(pos.x,pos.y);
      }
    }

     
  9. //unwinding_141011a

     

  10. I’ve got a new piece up at Grafik.net about rude user interfaces and you should check it out