Category experiments

Light extrusion experiment


Light Extrusions is a photography experiment that captures light trails generated from a 3d model. The 3d model is converted to paths using 3d printing software and fed into a 3d printer. Only instead of printing with plastic filament, it uses light from an LED. A camera captures the light using long exposure photography and the results are what you see here.




When MakerBot launched their 5th Generation 3D printers, they introduced the Smart Extruder System. The extruder element is held in place with magnets, making it easy to access filament jams and clogs. However, servicing the extruders themselves was a challenge, sometimes leading to a voided warranty. This project is an attempt to breathe new life into those dead extruders, effectively converting a Smart Extruder into a Light Extruder.

The inspiration for the light extruder came from the works of Ekaggrat Singh Kalsi. The goal was to give anyone with a Makerbot 5th gen printer (and a non functional extruder) the ability to create light extrusions of their own. To do this, I purposely added limitations. First, the printer itself must still operate as a 3d printer. That means any permanent modifications must be done to the lighter extruder only. No custom firmware was allowed but covering light leaks with gaffer tape is fine. Second, all parts must be available for purchase. Any custom 3d files will be available on the light extruder Thingiverse page. A parts list and detailed instructions are currently available there as well.


The Light Extruder
To understand how the light extruder works, you need to understand a little bit about the smart extruder. To feed filament through, there’s a special gear inside the extruder nicknamed the castle nut. The teeth of the gear pulls down filament to a heating element which melts it along a path. The light extruder works by reading in the values coming from the castle nut. If the castle nut is moving in a specific direction, the light will turn on. If it’s moving in the opposite direction or standing still it will turn off. Sounds simple right?

Well actually, not really. Detecting the motions of the castle nut was a little tricky. The only way to do it was to use an optical rotary encoder. It’s a little device that you can attach to an Arduino board to detect when something is rotating. Using Tinkercad, I created a custom mount that sits on top the extruder to house the encoder. Connecting it to the castle nut was a custom ordered round belt.

There has been 2 magical moments I’ve had with 3d printing. The first was when I made my first ever print. The second was the iteration process creating the mount and cog. If something didn’t fit, I made a quick change in model, printed it out in 10 minutes and tested. It’s one thing to debug in software, it’s a completely different experience when debugging something ‘physical’.


ByPassing checks.
The smart extruder has a few sensors built in. Since we are not using filament anymore, the sensors would trigger, preventing the printer from operating. When I worked at MakerBot, I had access to quite a few engineers so figuring out ways to bypass things like filament detection was easy with a little soldering. Bypassing the temperature sensor was a much more difficult problem and would require major electrical and mechanical hacks so leaving it alone was the only solution.

Once I had everything made, it was just a matter of covering all light leaks around the led light. This required boxing the printer and gaffer taping any other light sources on the printer like the extruder spotlight, the display and the LED knobs.


Trial and error.
There were many variables that led to a good capture. The only way to do this was through trial and error. First, the camera had to be light enough to fit on the build plate and small enough to not interfere with the printing process. I originally used an iPhone with apps like Slow Shutter Cam and NightCap Pro to handle the long exposure capture but the results were too inconsistent. Instead I used my m43 camera with a remote for bulb mode. Setting up the 3d model required choosing settings outside the recommendations of the software. Lastly, the LED itself required more precision so a small cheap fiber optic wire was used to dampen and focus the beam of light. Below are some of the calibration settings.

Overall, I’m pretty happy with the results and I will do more light extrusions when time permits.

Instructions for building a Light Extruder of your own.


Disc experiment

Recently I’ve been exploring shapes and forms generated by algorithms. Sometimes I have a shape in mind and execute accordingly. This time I took a different approach.

The disc experiment is an exploration of a simple shape, the arc. I know I wanted the arc to be able to transform and I know I wanted it to exist in 3D space. After a few iterations I came upon this general shape.

A tweet from Felix Turner mentioned I should hook it up to web Audio a simple audio component of chrome with some ability to analyze sound data in real time, similar to a sound based experiment’s i’ve tried before. The data was too complex to accurately relate the sound to the visual so after a few iterations, I blatantly copied what Felix did and averaged the data into 1 parameter to make it easier to understand. I recently got into a classical music phase and found myself using Claire De Lune by DeBussy to provide the data.

versions : 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09

credits below

Loop Waveform Visualizer by Felix Turner

Three.js 3D framework

Dat-gui gui framework.

jstween for animation

Claire De Lune by DeBussy

Iris experiment

I recently found an great article about bezier curves by Mike Kamermans. What made it extra amazing was that all the images were open-sourced, interactive files created with Processing JS. You’re able to follow the mathematics of beziers as well understand how they were executed by reading the code.

His brief about calculating offset curves sparked off this concept of layering. By taking the initial bezier and rotate it about the y axis you get a simple and easily adjustable lathe. Offset curves around a lathe create a beautiful layering effect which add quite a bit of dimension. Using gradient fills instead of solids as subtlety to the shape(s) generated. It’s called Eye primarily because the shapes it was generating once I added the gradient fill looked liked an Eyeball. I think in hindsight, this experiment should be renamed iris and because I have an older flash experiment already named eye.

Update – I’ve renamed it Iris.

This experiment was built in HTML5 using the excellent three.js and dat.gui libraries.

I had a decent understanding of the idea so I set about modifying my base code with 3 distinct parts starting from left to right…

  1. The interactive 2d representation of the bezier.
  2. The rotate-able 3d version of the lathe.
  3. Controls created in dat.gui to modify parameters.

After a few versions I was able to get the bezier code as well as the layering effect working in 2d space. I then started working on the 3d shape, constantly adding and refining more parameters. I Isolated a few parameters which affect the animation of the shape and then spent the rest of the time cleaning and refining. Once the majority of the math was done, I spent time creating different view-able options with lines, particles and eventually fills.

Click the image below to see a progression of work

version : 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15

I’ve only tested this in chrome so there’s a very good chance it will not work in other browsers due to the needs of WebGL.

wormy experiment

This experiment was an offshoot from my previous experiment where I wanted to create a simple following formation rather than the circular one that arc had.

This particular experiment was unusual in that I didn’t really have a clear goal in mind. I was trying to solve a particular geometry problem. One iteration led to another which led to another. The end result was just a cleanup of all the iterations so you can see the inner workings. My fiancee wanted to name it colon but I had to veto an name it something more professional like wormy.

I’m slowly learning more about about html5, and I’m finally at a point where I can express some of these ideas at the same fidelity that I had with flash and processing. The reality is that it wouldn’t be possible without some of the open source frameworks available. For this experiment, I use jquery, jqueryui, seb’s vector class and had help from mr elstob.

version 01
version 02
version 03
version 04
version 05
version 06
version 07
version 08
version 09
version 10
version 11
version 12
version 13
version 14
version 15
version 16
version 17

arc experiment

I’ve been drawing circles with code for quite a little while now.
For the most part, I’ve been drawing them using a simple sinusoidal equation which I’ve used a ridiculous amount of times.

    var percentage = i/total*Math.PI / 180
    var xPos = Math.cos(percentage) * radius + offsetX;
    var yPos = Math.sin(percentage) * radius + offsetY;
    // do stuff with values

You don’t have to fully understand trigonometry (although it does help if you do). Plug in some values that change the parameters and you can easily modify code. However, once I started to create arcs, this proved to cause a whole mess of issues, the biggest when determining when to rotate clockwise vs counterclockwise. From my understanding, the sin/cos functions are smart enough to get a range from 0-360°. Once you go pass that, the values reset back to 0°. You can keep track of it using states but the values keep getting clobbered. It’s like the the tall man, small blanket problem. Covering your head makes your feet cold and covering your feet makes your head cold. I wasn’t smart enough to figure this out so I sat on it for a few months, then a few years, I’ve tried tackling this a few times but I’ve always ended up using a workaround instead.

Cut away to a month back. I was reading a post about drawing arcs and circles without using sine and cosine in the main loop. I believe the purpose was to skip trigonometry which can be processing intensive.

var da = (endPositionInRads - startPositionInRads); // distance angle
var ss = 45; // segmenet spacing
var rs = (Math.abs(da) / (Math.PI * 2) * ss); // real segments
var tm = Math.tan(da / real_segments); // tangent multiplier
var rm = 1 - Math.cos(da / real_segments); //radial multiplier

// first position uses sinusoidal
var xPos = Math.cos(startPositionInRads) * radius + offsetX;
var yPos = Math.sin(startPositionInRads) * radius + offsetY;
var tx; // transitionX
var ty; // transitionY
for (i = 0; i < rs; i++) {
    tx = -(yPos - offsetY);
    ty = xPos - offsetX;
    xPos += tx * tm;
    yPos += ty * tm;
    xPos += (offsetX - xPos) * rm;
    yPos += (offsetY - yPos) * rm;
    // do stuff with values

(The code is a little larger but it works)

I didn’t think much of it at first. I’ve actually used it before just for the sake of using it. Going back to the arc problem again, I realized that a simple way to not get the modulus 360° problem was to not use sine and cosines at all. Sure enough it worked and the results of that can be seen below.

(left image uses trig, right image just uses math)

I’ve been completely reliant on using sines and cosines for the pass decade that it actually prevented me from doing what I wanted to do. I think I’m going to revisit a few old experiments that I’ve never published due to code complexity and take a look at it from a different perspective. All the iterations can be found below.

version 01
version 02
version 03
version 04
version 05
version 06
version 07
version 08
version 09
version 10