I wrote a tiny bit of processing.org (apparently it now supports Python!) to "pointify" images. The sketch allows for the user to define and limit the palette by picking individual colors off of the original image. You can also change the point sizes interactively. When in palette mode, the simple algorithm finds the closest 2 colors off of the palette and picks one randomly, this forces more diversity of colors in a section of the image.

Here's without using a palette:





 With a limiting palette:







from random import random, choice

WIDTH = 1000
HEIGHT = 800
POINT_SIZE = 7
PALLETTE_SIZE = 6
SPECTRUM_HEIGHT = 100
PAUSED = False
USE_PALLETTE = True
HIDE_CONTROLS = False
frames = 1000
img_uri = "/Users/maxime_beauchemin/Downloads/ripples.jpg"
img = None
spectrum = None
THUMB_SIZE = 200
thumb = None

def get_pallette(psize):
    p = []
    for i in range(psize):
        x = random() * WIDTH
        y = random() * HEIGHT
        p.append(img.get(int(x), int(y)));
    
    alternate_colors = []
    return p + alternate_colors

pallette = [color(0), color(255)]
def draw_pallette():
    square_size = 10
    for i, c in enumerate(pallette):
        fill(c)
        rect(i * square_size, HEIGHT-square_size, square_size, square_size)

def draw_point():
    x = random() * WIDTH
    y = random() * HEIGHT
    c = img.get(int(x), int(y));
    if USE_PALLETTE:
        pix = closest_color(c)
        fill(pix);
    else:
        fill(c)
    ellipse(x, y, POINT_SIZE, POINT_SIZE)

def color_dist(c1, c2):
    r = red(c1) - red(c2)
    g = green(c1) - green(c2)
    b = blue(c1) - blue(c2)
    return (b**2 + g**2 + r**2) ** 0.5

def closest_color(c):
    l = sorted([(color_dist(c, p), p) for p in pallette], key=lambda x: x[0])
    return choice(l[:2])[1]

def setup():
    size(WIDTH, HEIGHT)
    noStroke();
    alternate_pallette = []
    global pallette
    global thumb 
    global img
    global spectrum
    frameRate(30);
    
    thumb = loadImage(img_uri)
    img = loadImage(img_uri)
    img.resize(WIDTH, 0)
    spectrum = loadImage("/Users/maxime_beauchemin/Downloads/spectrum.jpg")
    thumb.resize(THUMB_SIZE, 0)
    spectrum.resize(THUMB_SIZE, SPECTRUM_HEIGHT)
    #pallette += get_pallette(PALLETTE_SIZE)
    variance = 50
    for p in pallette:
        c = color(red(p) + variance, green(p)+variance, blue(p)+variance)
        alternate_pallette.append(c)
        
    #pallette += alternate_pallette
    
def draw():
    if not PAUSED:
        for i in range(500):
            draw_point()
        if not HIDE_CONTROLS:
            draw_pallette()
            #thumb
            image(thumb, 0, SPECTRUM_HEIGHT)
            image(spectrum, 0, 0)
    
    
def mouseClicked():
    if mouseY > SPECTRUM_HEIGHT:
        c = thumb.get(mouseX, mouseY-SPECTRUM_HEIGHT)
    else:
        c = spectrum.get(mouseX, mouseY)
    pallette.append(c)
    
def keyPressed():
    global POINT_SIZE
    global PAUSED
    global USE_PALLETTE
    global HIDE_CONTROLS
    if key == 'x' and len(pallette)>1:
        pallette.pop()
    elif key == '-':
        POINT_SIZE -= 1
    elif key == '+':
        POINT_SIZE += 1
    elif key == 'p':
        PAUSED = not PAUSED
    elif key == 'u':
        USE_PALLETTE = not USE_PALLETTE
    elif key == 'h':
        HIDE_CONTROLS = not HIDE_CONTROLS
    

A laser cutter and a few lines of Javascript turned flat plywood into these two lamp shades.

I used Javascript to generate the vectors because I was already familiar with d3.js, and jsfiddle.net proved as a nice simple interactive IDE for the project. Before I knew it, I had vectors to "print".

Check out the interactive source code here: http://jsfiddle.net/mistercrunch/9pHBW/20/







Over my time working at the Facebook campus I was able to access the laser cutter from the wood shop and came up with a few designs. You can download the files from my Thingiverse page.






I've been playing with this laser cutter at work and as I'm only etching the surface of what this tool can do, I'm getting really happy with some of the results I get.


I've found a workflow that works pretty nitely while working on this project.


  •  Google image search for an image of interest (tree), activate "Search Tools" and filter on size:large and color:black&white.
  • Import the image on in Pixlr (Photosh or any other image editing tool will do just as good)
  • Crank up the contrast until you have only pure blacks and whites
  • Bring into Illustrator
  • Trace image (vectorize)
  • Make correction
  • Check for path duplicates (somehow Illustrator seems to generates dups when image tracing), delete dups manually, or use the layer pane to identify and bulk delete
  • Load up your laser cutting machine, make it do what it does
  • Sand, varnish, hang.



I made this LED suit. It's made out of about a hundred button pins I designed that each have 6 RGB LEDs. You can find more information about the button pins here. They are all networked to share power and each button pin can send messages to their neighbors.

Each pin has a button, and pushing this button will generate a new pattern randomly (flash type, flashing speed, base colors, color ranges, ...). The pattern also has a propagation speed at which it sends the pattern information to its neighbors, who will then pass it to theirs. The pattern spreads on the suit organically. There is no central brain on the suit. Any single button pin can fail, or connections can break and the rest of the suit will keep working. It is a distributed system.

The pins are velcroed on the suit so it can be washed.

The PWM and UART are both software.

The suite was for Burning Man and present at BM2011.



My friend Matthieu Godbout, accomplished photograph/hacker/artist, has been taking some awesome pictures of my LED button pin in action. The extended exposure and the use of reflective surfaces make for some very intersting pictures.

You can actually see how the PWM behaves very clearly. Looking at the pictures reminded me that all patterns are under 50% brightness or so, which I limited to save battery. This explains why there aren't any continuous beams of light. The decomposition of individual pulses shows the 7 possible colors combinations (R-G-B-RG-RB-GB-RGB).














Here's an unfinished track I worked on back in March 2010. I was exploring wobbling bass sounds.

The sound sample is from some guy back in the 50's who recorded his impressions while assisting to an atomic test somewhere in the Nevada desert.

AtomicTest.mp3