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.
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 it 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. I don’t know Julia; luckily ChatGPT does. Especially when shifting all of the computations to the GPU, performance is impressive. A whole 3D object is computed in roughly 1 second.
The workflow is roughly: hover over the Mandelbrot set, to see the live visualization of the Julia set corresponding to that coordinate. If you click, the coordinate will be stored. A quadratic line is fitted in between selected points where you clicked on the Mandelbrot set. For a set number of points (or layers) along this line, the Julia set is computed. Each Julia set is then stacked on top of each other, leading to a 3D volume.
Additionally, there are features of smoothing and distortion. Smoothing is needed because the Julia set is pixel based, and we don’t want sharp edges in our model, but a smooth texture. Distortion is the term I use for scaling the X and Y coordinates as a function of height Z, with a user defined formula. It can very much change the appearance and feel of a shape!
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, and we get a 3D volume that can be 3D printed immediately. 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.








Geef een reactie