Alex Thousand Liner

Rain Bow

For this prompt, I wanted it to rain and every time. your mouse was over a raindrop, It would change color. I was successfully able to create 100o falling rain drops and make them change color when the mouse was on one. However, I did not know how to make the drops fall at different intervals
so they all fall together. If I would work more on this project I would have them fall at different intervals and possibly have them avoid the cursor.

int radius = 2;
float y = -radius;
float speed = 3;
void setup() {
  size(1000, 200);
void draw() {
  float r=random(0,255);
float g=random(0,255);
float b=random(0,255);

  y += speed;
  if (y > height) {
y = -radius;
for (int i=2; i< =1000; i+=2) {
  line(i,y, i,y-5);
    if((mouseX>i) && (mouseX

Comments are closed.