Generative Art using GPT4 #2: 3D fractals

Click for full size, interactive version

There’s a serendipitous quality to experimenting with LLMs.

I was trying to make an interactive model of a Mandelbulb with ChatGPT. Although it didn’t work as intended, it produced something funky. Indeed, for making art their fallibility might be a feature and not a bug.

Here’s a tip for making HTML5 from code generated by LLMs:

  • It will get stuff wrong — frequently things won’t render at all
  • Paste the results into a text file, save as .html, open in Chrome, open the Developer Tools Panel in Chrome
  • If you have any errors they will be listed (see below) paste them into Chat GPT or your LLM of choice. Let it figure out what went wrong.

Generative Art using GPT4 #1: fractals

Mandelbrot Fractal Zoom

To produce something for many people was once an expensive endeavor, capital was required to open a factory or obtain a printing press.

If you’re reading this, you probably own a factory and a printing press. It’s the object attached to this screen. But you might need workers to help you turn ideas into products. This is where LLMs can help.

I’ve long been fascinated with fractals, these entities so rich in detail that they seem to live between dimensions as if overspilling the plane but not filling the volume. But I’d never bother coding them, the idea was enough, the work was too much.

With ChatGPT4 I created the above HTML5 fractal in a few steps, starting with the prompt to use the Multiverses palette:

Draw a Mandelbrot fractal using the palette #A66021 #07091C #19837E #11C55A #FFFD34 #B9FB4F #732401

Using the Code Interpreter this, pleasingly, produces an image in the ChatGPT window using Python. A few more prompts created one in HTML5 that zooms on click with overlay text that disappears.

What I’m feeling right now is a fractal sense of accomplishment — I’d be more proud if I’d coded this from scratch — to have been an artisan rather than a foreman. I’ve overspilled the plane, but not filled the volume.