Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup(){
- size(500,500);
- //randomise lines based on width of window.
- float l1 = random(width);
- float l2 = random(width-l1)+l1;
- float l3 = random(width-l2)+l2;
- //vertical lines
- stroke(0,0,255);
- line(l1,height,l1,0);
- stroke(0,255,0);
- line(l2,height,l2,0);
- stroke(255,0,0);
- line(l3,height,l3,0);
- //horizontal lines
- float l1h1 = random(height);
- float l1h2 = random(height);
- float l1h3 = random(height);
- stroke(0,0,255);
- line(0,l1h1,l1,l1h1);
- stroke(0,255,0);
- line(0,l1h2,l1,l1h2);
- stroke(255,0,0);
- line(0,l1h3,l1,l1h3);
- }
Advertisement
Add Comment
Please, Sign In to add comment