int tile = width/20; int half = tile/2; float size = tile/2; translate(tile/2, tile/2); for (int y=0; y<height; y+=tile) { for (int x=0; x<width; x+=tile) { pushMatrix(); translate (x, y); rotate(degrees(angle)); rect(0, 0, size, size); //line(x-half, y-half, x+half, y+half); popMatrix(); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter