Haig Armen Educational Archive


Exercise 38

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

now we randomize the radius using the noise() function


size(500,300);
background(255);
strokeWeight(0.5);   
smooth();

int centX = 250;
int centY = 150;

float x, y;
for (int i = 0; i<100; i++) {    
  float lastx = -999;
  float lasty = -999;
  float radiusNoise = random(10);
  float radius = 10;
  stroke(random(20), random(50), random(70), 80); 
  int startangle = int(random(360)); 
  int endangle =  1440 + int(random(1440)); 
  int anglestep =  5 + int(random(3)); 
  for (float ang = startangle; ang  -999) {
      line(x,y,lastx,lasty);
    }
    lastx = x;
    lasty = y;  
  }
}

No comments on ‘Exercise 38’

Leave a Reply