Archive for November, 2009

Bordo Bello

Monday, November 30th, 2009

After a long weekend filled with mucho trial and error, I have finally completed my submission for Bordo Bello. The board itself is painted matte black, with flashing for decor. Behind the board a 7-inch digital picture frame is back-mounted. The picture frame contains just over 75 Processing-based, code-generated art. All art was exported from one code-base. Below you will find images of the finished product, followed by the process in reverse. Be sure to attend the auction in Denver on December 11th.

Snow

Monday, November 16th, 2009

It snowed in Boulder this weekend. As a result, I cranked out some snow-like Processing sketches. In addition, I have been asked about the creation of these sketches, and sketches like these. Therefore, following the sketches is the code that generated them, a download of the pde file, and some further explanation.

The code morphed slightly over the production of all five sketches. Here is the code that generated the last two sketches. I have tried to comment as best as possible:

  • // Snow boxes - November 2009, Noah Larsen, @earlatron
  • // library for exporting pdf uncomment this line, beginRecord line, and endRecord line to generate pdf on run
  • // import processing.pdf.*;
  • // Setup sketch
  • void setup() {
  • // Sets size of sketch
  • size(640, 480);
  • smooth();
  • //Start recording for pdf - import, beginRecord, endRecord must be uncommented to run
  • //Be sure to change file name each run, otherwise and overwrite will occur
  • //beginRecord(PDF, "sketch_01.pdf");
  • }
  • // Start Drawing
  • void draw() {
  • // Sets color of background. Randomizes RGB values
  • background(random(150, 255), random(0, 75), random(0, 75));
  • //Draws a scattered bunch of white dots all over screen as backdrop.
  • for(int j=1; j<10000; j+=1) {
  • // random starting point for x - these are not global variables and terminate after loop is run.
  • float x_point = random(0, 640);
  • // random starting point for y - these are not global variables and terminate after loop is run.
  • float y_point = random(0, 480);
  • // sets end point variable for x
  • float x_end_point = x_point+1;
  • // sets end point variable for y
  • float y_end_point = y_point+1;
  • // sets stroke color to white
  • stroke(255);
  • // Draws a two point lines
  • line(x_point, y_point, x_end_point, y_end_point);
  • // stops animation, creating static image.
  • noLoop();
  • }
  • //draws 19 boxes full of white dots
  • for(int j=1; j<20; j+=1) {
  • // random starting point for x
  • float x_var = random(0, 640);
  • // random starting point for y
  • float y_var = random(0, 480);
  • // random end point for x
  • float x_end = x_var+random(30, 300);
  • //random end point for y
  • float y_end = y_var+random(30, 300);
  • // start of sub loop, draws 10,000 dots, or one pixel lines
  • for(int i=1; i<10000; i+=1) {
  • // selects staring point for x based on random set variables above
  • float x_point = random(x_var, x_end);
  • // selects staring point for y based on random set variables above
  • float y_point = random(y_var, y_end);
  • // sets end point variable for x
  • float x_end_point = x_point+1;
  • // sets end point variable for y
  • float y_end_point = y_point+1;
  • // sets color of stroke to white
  • stroke(255);
  • // Draws a two point line
  • line(x_point, y_point, x_end_point, y_end_point);
  • // Stops animation, creating static drawing
  • noLoop();
  • }
  • }
  • //End recording for pdf - import, beginRecord, endRecord must be uncommented to run
  • //endRecord();
  • }

The above code generates a 2 pixel line, as I found it renders better when opening in Photoshop for saving from pdf to jpeg. You could change out the line for a point if you wanted. This code is pretty processor intensive as it generates somewhere around 200,000 vectors, albeit small ones. The code should be pretty well understandable, but in short, it sets up the sketch, generates a bunch of background dots, then creates 19 boxes of dots that are randomly sized and placed by doing some basic math. If you want to export to pdf, be sure to uncomment the 3 lines that import, start and end the pdf recording function.

Download the pde file here.

You can get your hands on the most recent version of Processing here.

Bursts

Wednesday, November 11th, 2009

So, my plan to work further with SVG-based renderings took a bit of a backseat to a new idea I had this morning. So, I started with the burst, and worked my way through adding components and colors through to the end. Here is a snapshot of all the steps through the process. All done in Processing.

Making Connections

Tuesday, November 10th, 2009

More Processing work. No SVG this time, just straight code. Will be pulling the SVG back in for the next round.

Starry-eyed

Tuesday, November 3rd, 2009

Finished up some new work last night…