Advertisement
Nojus_Globys

pattern

Dec 6th, 2022 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | Software | 0 0
  1. int size = 100;
  2.  
  3. void setup () {
  4.     size (1280, 747);
  5.     background (0);
  6.     noStroke ();
  7.     fill (255);
  8.    
  9.     int count = 0;
  10.     for (int x = 0; x < width; x += size) {
  11.         for (int y = (count % 2 == 0) ? 0 : size; y < height; y += size * 2)
  12.             square (x, y, size);
  13.         ++count;
  14.     }
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement