Kluster

New York City, New York 2012-12-03

Description

Kluster is a visual experiment and technology demo that uses k-means clustering to create a 3D star system using the pixels of an image. You’ll have the best luck with Chrome, and clicking the autopilot button once you generate a star system is highly recommended.

Video

Background

For my final in Makematics, I wanted to explore the possibility of using a machine learning system to generate artwork. My view of the whole process was admittedly naive, and I was frustrated by the level of oversight required to both train and get output from something like an SVM. I began looking for methods to have a computer organize data on its own, and became interested in k-means clustering. When I saw some palette generation examples by Mohit Muthanna, I was sold.

Concept

Kluster is a browser-based application that can take any user-submitted image and break it into a three dimensional star system—something along the lines of the globular cluster photos from the Hubble that I had seen as a kid. The image pixels are broken into a twelve-color palette using k-means, and then the centroids are distributed in space based on their position in the LAB colorspace. Individual pixels orbit around these centroids, with their distance diCTAted by their similarity to the centroid color and their size based on their luminosity.

Stills

Kluster Autopilot 1
Kluster Autopilot 2
Kluster Autopilot 3
Kluster Autopilot 4
Kluster Autopilot 5
Kluster Autopilot 6

Technologies

Kluster uses a number of brand-new web technologies—most prominently WebGL, powered by the excellent three.js, as well as the File API, Web Workers and WebRTC.

All source code and assets for Kluster are available on GitHub.