• fullscreen
  • random_walk_final.pde
  • int x0 = 250;
    int y0 = 250;
    int xsig;
    int ysig;
    void setup(){
      size(500,500);
      background(250);
    
    }
    void draw(){
      xsig = x0 + (int)random(-10,10);
      ysig = y0 + (int)random(-10,10);
      if(xsig < 0 & xsig > 250 & ysig < 0 & ysig >250){
      }
      else{
        line(x0, y0, xsig, ysig);
        x0 = xsig;
        y0 = ysig;
      }
    }
    
    
    

    code

    tweaks (0)

    about this sketch

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

    license

    advertisement

    Aaron Bustillo

    Random Walk

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

    i could not find a random walk app so i made one... hope it helps

    You need to login/register to comment.