Randomly-generated shape pendants

Adam Scherlis

Randomly-generated shape pendants

2025-01-05

I handed out laser-cut pendants this past Burning Man that looked like this:

wooden pendants in a variety of symmetrical jagged shapes

I made 72 of them, each a unique shape, with rotational symmetry of varying orders.

Shapes

My desiderata were approximately:

Describing the shapes in polar coordinates and taking a Fourier series made it pretty easy to get all of this.

We can make the function periodic with period (for a closed shape) or (for -fold rotational symmetry) by limiting the frequencies in the series to multiples of or (respectively).

The shape of the amplitude spectrum controls the general vibe of the shapes, and the phases determine all the details. Fractals and many kind of natural textures have power-law spectra, so I used that for the amplitudes and generated the phases uniformly randomly:

Then I fiddled with the hyperparameters (power-law exponent , highest frequency before the smoothness cutoff, constant term , order of rotational symmetry) until I liked the batches of shapes coming out of my script.

Cutting

Most laser cutters at hackerspaces seem to be hooked up to computers running LightBurn, which is pretty similar in interface to Inkscape or Adobe Illustrator. It imports SVG seamlessly (often with distance units and layers intact), so I try to keep my workflow inside Python as much as possible, then in Inkscape for any touch-ups or manual steps, and then in LightBurn to set details of cuts and engraving and any last-minute issues I forgot.

For this project, I added the Burning Man logos in Inkscape. (I also drew them myself, because I didn't like anything I found in SVG.) Just before the cut, my friend Cody suggested giving them holes for necklaces or keychains, which I added in LightBurn. In hindsight, I wish I'd done both of those in Python, with the hole position chosen automatically.

The aftermath:

wooden square with jagged symmetrical shapes cut out, with laser cutter visible in background

Ephemerality?

The photo at the top of the post is the only decent one I took. You'll have to trust me that the pile of 72 pendants looked cool; 72 different people have them now.

Code

My Jupyter notebook is here.

Most of the hard-coded "magic numbers" are things I just fiddled with repeatedly until things looked right.