Last week, Joanna Wrzaszczyk and I completed the first version of our dynamic light sculpture, inspired by Italo Calvino’s Invisible Cities and the Traveling Salesman Problem. We have decided to call it the Traveler’s Lamp.
Here is the midterm presentation that Joanna and I delivered in March:
We received a lot of feedback after that presentation, which resulted in a number of revisions to the lamp’s overall design. Here are some sketches I made during that process:
Since that presentation, Joanna and I successfully designed and printed ten city-nodes for the lamp. Here is the deck from our final presentation, which contains renderings of all the city-nodes:
We built the structure from laser-cut acrylic, fishing line, and 38-gauge wire. The top and base plates of the acrylic scaffolding are laser etched with the first and last page, respectively, from Invisible Cities. We fabricated the wood base on ITP’s CNC router from 3/4″ plywood.
Here are some photos of the assembled lamp:
Here’s a sketch, by Joanna, of the x-y-z coordinate plot that we fed into the computer program:
And finally, here’s some of the Python code that’s running on the Raspberry Pi:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
def tsp(): startingPin = random.choice(pins) pins.remove(startingPin) GPIO.output(startingPin, True) sleep(0.5) distances = [] for i in range(pins): for p in pins: dist = distance(locDict[startingPin], locDict[p]) distances.append((dist, p)) GPIO.output(p, True) sleep(0.5) GPIO.output(p, False) distances = sorted(distances, key=lambda x: x[0]) nextPin = distances[0][1] GPIO.output(nextPin, True) sleep(0.5) pins.remove(nextPin) startingPin = nextPin |