Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int space = (10), step = 10;
- int i;
- boolean b;
- void setup() {
- size(500, 500 );
- background(0);
- stroke(255);
- }
- void draw() {
- stroke ( random(256), random(256),random(256));
- if ( i+space < width/2)
- {
- b = true;
- } else
- {
- b = false;
- }
- // kortere versie b = i+space, space, i+space, height-space);
- if ( b) //b == true
- {
- //vertical lines
- line(i+space, space, i+space, height-space);
- } else
- {
- //horizontal line
- line( width/2, i-width/2 + space*2, width-space, i - width/2 + space*2);
- }
- i+=step;
- if ( i + space > height + width/2 - 2*space)
- {
- i = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement