1. //tide_141004a

     
  2. //tide_141004c

     
  3. //tide_141004b

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

    void setup() {
      size(500,700);
      frameRate(24);
      startScatter();
      seedColor();
    }

    void draw() {
      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;
          p.pos.x = p.tpos.x;
        }
        if (p.pos.y > height || p.pos.y < 0) {
          p.tpos.y = height/2;
          p.pos.y = p.tpos.y;
        }
        stroke(255-threshold);
        fill(255-threshold);
        p.render();
      }
    }

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

    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.1);
      }
      void render(){
        rect(pos.x,pos.y,10,10);
      }
    }

     
  4. //tiles_141001a

     
  5. jamesproctor:

    New work up in Wilmington at the Chris White gallery thanks to the NWAA and Barrel of Makers

    Very excited to have my work up in such good company

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

    void setup() {
      size(width, height);
      background(0);
      frameRate(12);
      startScatter();
    }

    void draw() {
      fill(threshold,12);
      rect(-2,-2,width+2,height+2);
      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;
          p.pos.x = p.tpos.x;
        }
        if (p.pos.y > height || p.pos.y < 0) {
          p.tpos.y = height/2;
          p.pos.y = p.tpos.y;
        }
        stroke(0);
        fill(0);
        p.render();
      }
      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;
    }

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

    void startScatter(){
      for (int i=0; i<width; 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);
      }
    }

     
  7. //blank_140930a

     
  8. //shell_140926c

     
  9. //arch_140926a - collaboration with Enchanted_Console

     
  10. //shell_140928b