we have updated our home with some new furniture. as a result we now have more space to hang some pictures and what is better than creating the pictures by yourself? yes right, code them by yourself!!! at least if you can’t draw.
the sketch I made today is called “cubicle” and does nothing more than drawing some quads and rotate every quad by some degrees. the result is vortex of quads :-)
the code behind it is fairly simple, nothing special to explain. just some basic setup of size and settings and after that we’re ready to go. draw a lot of quads till they reach the border which is set in the condition of the while iteration. have a look:
size(1000,1000); background(255); smooth(); strokeWeight(0.5); noFill(); float initialSize = 20.0f; float rotation = 0.430f; float strokeAlph = 30.0f; while(initialSize < height - 300) { stroke(0,strokeAlph); pushMatrix(); translate(width/2, height/2); rotate(rotation); rect( 0 - initialSize / 2, 0 - initialSize / 2, initialSize, initialSize); popMatrix(); initialSize += sqrt( 2 * pow(initialSize,2)) * .0033; strokeAlph += .1f; rotation += noise(PI / 3); }
if you want you can grab the code (and other sketches too) on my github!