Haig Armen Educational Archive


Exercise 35

by Haig. Average Reading Time: less than a minute.

Now let’s add noise instead of randomizing. the new point will have some reference to the point before it.


size(500, 100);
background(255);
strokeWeight(5);
smooth();

stroke(0, 30);
line(20, 50, 480, 50);
stroke(20, 50, 70);
int step = 10;
float lastx = -999;
float lasty = -999;
float ynoise = random(10);
float y;
for (int x=20; x -999) {
    line(x, y, lastx, lasty);
  }
  lastx = x;
  lasty = y;
  ynoise += 0.1;
}

No comments on ‘Exercise 35’

Leave a Reply