raining yet?

I’m working on the graphics for my projection, playing with lines and circles to create rain-like visuals. The lines and circles build as you crunch your fingers, the interaction is connected to the flexible sensor. As the curve increases in the sensor, the resistance measurement is sent through the analog pin on the Arduino board. I am using simple draw functions right now, but I am aiming to clean up the code to make this effect more random and recursive. Here’s the code I am using to draw the lines and circles:

if (inByte > 70) {
// draw the line:
stroke(225);
line(xPos, -height, xPos + 10, height – inByte);
stroke(225);
line(xPos + 10, -height, xPos + 40, height – inByte);
stroke(225);
line(xPos + 20, -height, xPos + 100, height – inByte);
stroke(225);
line(xPos, -height, xPos + 200, height – inByte);
stroke(225);
line(xPos + 50, -height, xPos + 250, height – inByte);
stroke(225);
line(xPos + 80, -height, xPos + 280, height – inByte);
stroke(225);
line(xPos, -height, xPos + 300, height – inByte);
stroke(225);
line(xPos + 170, -height, xPos + 500, height – inByte);
stroke(225);
line(xPos + 210, -height, xPos + 600, height – inByte);
cs = new CircleGlyph[10];
for (int i = 0; i < cs.length; i = i + 1) {
cs[i] = new CircleGlyph();
cs[i].paint();
}

… and the circle code is sitting in a class…

void paint() {
//action could be called anything, make it meaningful
fill(240, 240, 240, random(240));
noStroke();

ellipse (x, y, 10 + s, 10 + s);
}
}

I know this can be refined, but I’m really more concerned with the aesthetics at the moment. I want to pull a colour palette from this image of a storm I took in Thailand years ago. Carrying on…