Cloud Seeds: Growing Cumulus Clouds

edited November 2013 in Share Your Work

I haven't used Processing in years, but I was excited to see Processing 2.0 a couple of weeks ago, so I revisited an old sketch and updated it for animated output. Enjoy:

Tagged:

Comments

  • Very nice. Can you share the code?

  • @boye4600 Thanks! Sorry, I do not have plans to release the source code for this.

  • nice. I remember looking at clouds on the Nintendo Gamecube. One thing i noticed was that clouds have a lot of self similarity. As such i would take a very very simple boxy 3D cloud shape (built using some real cloud shape) and then at random points on it's surface i would draw another instance of the fist cloud but scaled down to 0.75 and a little random xyz local scale. Then at each of those little clouds i would pick a random point on the surface and do the same. Down to maybe 4-5 passes. As i remember this made pretty good clouds. pretty.

  • edited November 2013

    I had tried generating effect like yours but it is not as good as yours ... :D

        ArrayList poop = new ArrayList();
        int bg=0;
        Cloud c;
        void setup() {
          size(600, 400);
    
          for (int i=0;i<100;i++) {
            Cloud c = new Cloud((int)random(width/2-50, width/2+50), (int)random(height/2-50, height/2+50), random(0, 2*PI)); 
            poop.add(c);
          }
        }
        int i=0;
        void draw() {
          background(bg);
          if (i==15) { 
            bg = (color) random(#000000);
            i=0;
          }
          for (int i=0;i<poop.size();i++) {
            Cloud c = (Cloud) poop.get(i);
            c.display();
            c.run();
          }
          i++;
          println(i);
        }
    
    
        class Cloud {
          int x, y;
          PVector loc, center, increment;
          float t, esize, angle, SIZE, acc= 0.98;
          Cloud(int _x, int _y, float _angle) {
            x = _x;
            y = _y;
            loc = new PVector(x, y);
            center = new PVector(x, y);
            esize = random(2, 80);
            SIZE = random(150);
            angle = _angle;
            t = random(PI);
            int xp = (int)random(-5, 5);
            int yp = (int)random(-5, 5);
            increment = new PVector(xp, yp);
          }
    
          void display() {
            pushMatrix();
            translate(loc.x, loc.y);
            rotate(angle);
            noFill();
            stroke(-1, 80);
            strokeWeight(2);
            arc(0, 0, esize, esize, t+QUARTER_PI, TWO_PI);
            noStroke();
            fill(-1, 50);
            ellipse(0, 0, esize, esize);
            popMatrix();
            fill(-1,10);
            ellipse(x, y, 100, 100);
          }
          void run() {
            if (loc.dist(center)<random(150)-esize/2 && 100<loc.y && loc.y<height-100) {
              loc.add(increment);
              //loc.mult(1.08);
            }
    
            if (esize < SIZE )esize = esize+1;
          }
        }
    
Sign In or Register to comment.