Eev and SVG
Let me start by explaing a distant goal...
...no, let me start by explaining how I draw diagrams now. I teach Maths in a university in Brazil, and my laptop is an old Thinkpad with Libreboot that is too old to run Tikz comfortably; so a few years ago I started to extend Dednat6 with own libraries for drawing 2D and 3D figures for Calculus. Here are some examples of figures that I draw/use/generate:
To see how these figures look in the PDFs click here, here, and here.
My libraries generate code for pict2e, that is very lightweight. Right now the Lua code that I need to write to draw these diagrams is kind of ugly, but I rewrite parts of my libraries often - because it's fun, obviously - and I am trying to make my libraries support a syntax like this one from manim - including generating animations, by making each page of a PDF play the role of a page in a flip book - like here.
My distant goal is to make my libraries also generate SVG code that can be displayed in an Emacs buffer using svg.el. I wrote emlua recently, and it lets me run Lua "natively" inside Emacs; it can run my libraries for Dednat6, and it should be easy to make emlua modify an SVG object that is being displayed in an Emacs buffer.
Testing & learning svg.el
I am trying to learn how to use svg.el - obviously by writing examples that I can run line by line by just typing <f8> many times. If you have eev installed you can run the example below by just copying it to an Emacs buffer, eval-ing the "require" and the "defun" with `M-e', and then typing <f8> on the red star lines:
You will get something like this screenshot: