//Background decoration class class Grass{ float [] x, y; Grass(float xpos){ x = new float[4]; y = new float[4]; float theta = HALF_PI + PI; float ypos = height + 5; for(int i = 0; i < x.length; i++){ theta += random(-angleStep, angleStep); x[i] = xpos; y[i] = ypos; xpos += cos(theta) * random(20, 40); ypos += sin(theta) * random(20, 40); } } void draw(){ for(int i = 1; i < x.length; i++){ strokeWeight(6 - (i * 1.5)); stroke(0, 150, 0); line(x[i - 1], y[i - 1], x[i], y[i]); strokeWeight(1); if(i != 1){ fill(20, 200, 0); stroke(0, 150, 0); ellipse(x[i - 1], y[i - 1], 16 - (i<<2), 16 - (i<<2)); } } } }