hello!
i´m a complete beginner, tried to make falling snow, now there´s 2 things missing:
1. don´t know how to put a limit, if(x>600) ... which statement i need to put, that the sequence starts from the beginning?
and 2. how i do it without having to draw all the snowflakes? i think with an array (which i don´t understand in the manual)....
somebody can please, please, help me with the code?
please ?
carmen
float x, y;
void setup()
{
size(800,600);
smooth();
noStroke();
frameRate(60);
}
void draw()
{
background(102);
x = x + 0.06;
y = y + 0.2;
translate(x, y);
fill(255);
ellipse(x+50, y+10, 5, 5);
ellipse(x, y, 4, 4);
ellipse(x+110, y+40, 5, 5);
ellipse(x+200, y+150, 4, 4);
ellipse(x+550, y+210, 5, 5);
ellipse(x+500, y, 4, 4);
ellipse(x+510, y+40, 5, 5);
ellipse(x+500, y+150, 4, 4);
ellipse(x+250, y+30, 5, 5);
ellipse(x, y, 4, 4);
ellipse(x+210, y+20, 5, 5);
ellipse(x+240, y+50, 4, 4);
ellipse(x+550, y+210, 5, 5);
ellipse(x+500, y+20, 4, 4);
ellipse(x+510, y+140, 5, 5);
ellipse(x+500, y+150, 4, 4);
ellipse(x+750, y+110, 5, 5);
ellipse(x+700, y+59, 4, 4);
ellipse(x+580, y+60, 5, 5);
ellipse(x+650, y+150, 4, 4);
ellipse(x+670, y+210, 5, 5);
ellipse(x+600, y, 4, 4);
ellipse(x+610, y+40, 5, 5);
ellipse(x+580, y+150, 4, 4);
}