Get the latest tech news

Animating Ptolemy's Equant with Python, SVG, and CSS


[UPDATE: A full Solar System model is now available that you can view, animated using the techniques described in this post! See Ptolemy’s cosmos, to scale.] You will recall my previous blog post that tried to build the necessary scaffolding for me to finally write up my 2017 PyCon Ireland keynote on the structure of the Medieval universe. It ran into several problems with matplotlib animations — but, having written that post, I realized that the problem ran deeper.

The result would be an animated Solar System that fits into a few thousand bytes, would render with perfect clarity, and runs continuously for as long has the viewer was willing to watch! For example, we can ask the curve to launch out at a low angle along the x-axis and then, at the top of the diagram, to finish with a similar horizontal approach to its endpoint — producing a spline that reminds us of the equant’s motion: Finally, after these years of delay, I’ll use my next few blog posts to build from these simpler pieces a complete Ptolemaic model of the solar system — all animated in the browser without any matplotlib involved.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of css

css

Photo of SVG

SVG

Related news:

News photo

Matcha.css – Drop-in semantic styling library in pure CSS

News photo

NiceGUI – Simple web apps with Python

News photo

Extracting Words from Scanned Books: A Step-by-Step Tutorial with Python, OpenCV