1. //dispersedStrata_140826a

     
  2. //dispersedStrata_140825a
    ArrayList<PointPosition> pointPosition = new ArrayList();
    boolean alternate = false;
    int threshold = 135;
    int width = 500,
        height = 750,
        dx = 0,
        dy = 0;
    int[] directions = {
        (width*-1)-1,
        (width*-1)+1,
        width+1,
        width-1
      };
    int[] pDirections = {
        1,
        -1
      };

    void setup(){
      size(width,height);
      background(0);
      frameRate(24);
      seedPoints(width);
    }

    void draw(){
      fill(50,5);
      rect(-2,-2,width+2,height+2);
      for(PointPosition p:pointPosition){
        dx = pDirections[int(random(pDirections.length))];
        dy = pDirections[int(random(pDirections.length))];
        p.update(dx,dy);
        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] = pixels[k+1];
          } else if (brightness(pixels[k]) < threshold){
            //
          } else {
            pixels[k-width] = pixels[k];
            pixels[k] = pixels[k+pModifier];
          }
        }
      updatePixels();
      threshold = setThreshold(threshold,0,255);
    }

    class PointPosition {
      int x,y;
      color c;
      void update(int dx, int dy){  
        x = x + dx;
        y = y + dy;
      }
      void render(){
        stroke(c);
        point(x,y);
      }
    }

    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 seedPoints(int count){
      for (int i=0; i<count; i++) {
        PointPosition p = new PointPosition();
          p.c = color(
                  map(i,0,abs(cos(i)*count),0,255),
                  map(i,0,abs(sin(i)*count),0,255),
                  map(sin(i),0,1,0,255)
                  );
          p.x = width/2+int(sin(i)*width/3);
          p.y = height/2+int(tan(i)*i);
        pointPosition.add(p);
      }
    }

     
  3. //protein_140825a

     
  4. //floatingStrata_140819c

     
  5. //protein_140821b
    ArrayList<PointPosition> pointPosition = new ArrayList();
    int width = 500,
        height = 750,
        dx = 0,
        dy = 0;
    int[] directions = {
        1,
        -1
      };

    void setup(){
      size(width,height);
      background(255);
      frameRate(24);
      seedPoints(width);
    }

    void draw(){
      for(PointPosition p:pointPosition){
        dx = directions[int(random(directions.length))];
        dy = directions[int(random(directions.length))];
        p.update(dx,dy);
        p.render();
      }
    }

    class PointPosition {
      int x,y;
      color c;
      void update(int dx, int dy){  
        x = x + dx;
        y = y + dy;
      }
      void render(){
        stroke(c);
        point(x,y);
      }
    }

    void seedPoints(int count){
      for (int i=0; i<count; i++) {
        PointPosition p = new PointPosition();
          p.c = color(
                  map(i,0,abs(cos(i)*count),0,255),
                  map(i,0,abs(sin(i)*count),0,255),
                  map(sin(i),0,1,0,255)
                  );
          p.x = width/2+int(cos(i)*width/(i/int(count/10)));
          p.y = height/2+int(sin(i)*width/(i/int(count/10)));
        pointPosition.add(p);
      }
    }

     
  6. //floatingStrata_140819b

     
  7. //protein_140821a

     
  8. //floatingStrata_140819d

    float rColor,gColor,bColor;
    boolean alternate = false;
    int pModifier, threshold;
    int width = 500,
        height = 750;
    int[] directions = {
        (width*-1)-1,
        (width*-1)+1,
        width+1,
        width-1
      };

    void setup() {
      size(width,height);
      background(255);
      threshold = 0;
      setupPoints();
    }

    void draw(){
      loadPixels();
        for (int k=width+1; k<width*height-width-1; k++){
          pModifier = directions[int(random(4))];
          if (brightness(pixels[k]) == threshold) {
            pixels[k-1] = pixels[k+1];
          } else if (brightness(pixels[k]) > threshold){
            //
          } else {
            pixels[k-width] = pixels[k];
            pixels[k] = pixels[k+pModifier];
          }
        }
      updatePixels();
      threshold = setThreshold(threshold,0,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 setupPoints(){
      translate(width/2,height/3*2);
      for (int i=1; i<width; i++){
        for (int j=1; j<height; j++){
          rColor = map(i,0,width,0,255);
          gColor = map(i%j,0,255,0,255);
          bColor = map(j,0,height,0,255);
          pushMatrix();
            rotate(radians(i%j));
            translate(sin(i)*width/3,tan(j)/height*3);
            stroke(rColor,gColor,bColor);
            point(0,0);
          popMatrix();
        }
      }
    }

     
  9. //floatingStrata_140819a

     
  10. //rgbCosPattern_140817a
    //from
    //rgbCosPattern_130324a
    float rColor,gColor,bColor;

    void setup(){
      size(500,750);
    }

    void draw() {
      for (int i=0; i<width; i++){
        for (int j=0; j<height; j++){
          //c
          rColor = map(sin(i*j)*i,0,sin(1)*i,0,135);
          gColor = map(tan(i*j)*j,0,tan(1)*j,153,135);
          bColor = map(cos(i*j)*j,0,cos(1)*j,153,255);
          stroke(rColor,gColor,bColor);
          point(i,j);
        }
      }
    }