Let's see...

New item with refactored code.

After struggling to get those toruses on paper and not being happy with the results due to a lack of optimisation, I decided I needed to refactor my tools. Working on fixing what I had felt like a chore to be avoided, which is not what you want for a side-project.

So over the last couple of weeks I've started a new tool which is a joy to work on, and I've been quite productive. The old tools started out as pure Janet and then became augmented Janet using C/C++, which then became ugly. The new project is all Rust -- which I don't love absolutely to bits, but it's way preferable to C++ -- and mimics the old set up in a way. I've written all the tricky stuff, like font rendering and G-code generation in Rust, but also written a bespoke interpreter to drive it. It looks like LISP, so not too far from Janet, but it's as basic an interpreter you could imagine. And it works really well! More gnarly stuff can go in, like 3D mesh handling and the view-graph generation, but it'll all be in Rust and fairly easy to complete.

To test the new engine I made an item illustrating the Heighway dragon curve, which is an old favourite of many, including Donald Knuth. The implementation uses a Lindenmayer system to iterate on building the curve, all implemented in the scripting language, which I'm calling Halfp, for the interpreter.

Here it is.

dragon-curve-big

The beauty of the curve is that it's all one line which is nice to observe, plus it meant it didn't take too long to plot.

dragon-curve-closeup