• fullscreen
  • artegenerativo01b.pde
  • /*Día 1 del hackpact de arte generativo
     Por Eduardo H Obieta
     http://artegenerativo.laad.com.mx 
     
     */
    
    float rota[];
    float pos1[];
    float pos2[];
    float vel[];
    
    float blx[];
    float bly[];
    int n = 50;
    
    void setup() {
      size(800, 600,P3D);
      background(0);
      smooth();
    
      vel = new float[n];
      pos1= new float[n];
      pos2= new float[n];
      rota= new float[n];
      blx = new float[n];
      bly = new float[n];
    
      for (int i=0;i<n;i++) {
        vel[i] = random(0.02);
        pos1[i]= random(width/2);
        pos2[i]= random(height/2);
      }
    }
    
    void draw() {
      translate(width/2, height/2);
      stroke(255);
      rotateZ(millis()*0.002);
    for (int i=0;i<n;i++) {
    
        rotate(-rota[i]);
    
        blx[i]=noise(pos1[i])*300;
        bly[i]=noise(pos2[i])*300;
    
        point(blx[i], bly[i]);
    
        rota[i]+= 0.001;
        pos1[i]+=vel[i];
        pos2[i]+=vel[i];
      }
    }
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Eduardo Obieta

    Arte Generativo. Hackpact Dia 01

    Add to Faves Me Likey@! 3
    You must login/register to add this sketch to your favorites.

    hackpact. Generative Art. Day 01.

    More info about this hackpact
    http://artegenerativo.laad.com.mx

    de lujo
    You need to login/register to comment.