The Julia Lamp

A while ago, I wanted to 3D print something, for the purpose of showing a 3D printer in motion. The Julia vase The Julia vase by Virtox has always had my liking. After printing a first, the printer had to keep on going! I printed another one, larger, and in transparent material. Now, wondering what…

A while ago, I wanted to 3D print something, for the purpose of showing a 3D printer in motion.

The Julia vase

The Julia vase by Virtox has always had my liking.

After printing a first, the printer had to keep on going! I printed another one, larger, and in transparent material. Now, wondering what to do, I put it on an LED bulb. My house still doesn’t have lamp shades everywhere; they say that if your house has lamp shades, it is finished. So, easy fix.

It looks so pleasing! And… an idea is born: computationally generated lampshades. That’s the easy part, the idea. Then comes programming and perseverance, and some frustration in between. A lot of programming. And a lot of iterations. Not just iterations as in physical prototypes, but also, iterative calculations of a formula. Let’s move on!

The Julia set

Ever seen the trippy images of the Mandelbrot and Julia sets? No? Here you go: https://en.wikipedia.org/wiki/Julia_set

Or, for an interactive version: https://icefractal.com/julia/

In short, the Julia set is a set of complex numbers. We iterate a formula (typically z = z² + c). If after many iterations z is within a certain value, then we consider this iteration to be in the Julia set. The Julia set is pixel based; the value of c is chosen based on pixel position.

This means we need to do a lot (and I mean, a lot) of calculations! For every pixel, we need to iterate hundreds of times.

Julia, the programming language

For the computational generation, I’m using the programming language Julia. After trying a bit in Python, it seemed performance was limited. In Julia I get very smooth visualizations. Especially when shifting all of the computations to the GPU, performance is impressive. A whole 3D object is computed in roughly 1 second in low resolution; perfect for getting an idea of the shape that is being made.

Let’s take a moment of reflection. Within a few seconds and a few clicks, the GPU is doing roughly 2,500,000,000 computations, directly giving a visualisation of the 3D volume . I am very positively surprised with the capabilities of Julia.

Julia lamps

The name Julia lamps comes, unsurprisingly, from Julia sets generated in the Julia programming language.

Below is a series of shapes that have been generated with my Julia software.

Each shape is unique and hand-picked.

Tags:

Geef een reactie

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *