Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int startX, startY, endX, endY;
- void setup(){
- size(640,480);
- startX = 0;
- startY = 150;
- }
- void draw(){
- stroke((int)(Math.random()*256),(int)(Math.random()*256),(int)(Math.random()*256));
- endX = startX + (int)(Math.random() * 9 + 1);
- endY = startY + (int)(Math.random() * 19 - 9);
- line(startX, startY, endX, endY);
- startX = endX;
- startY = endY;
- startX %= width;
- startY %= height;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement