The fiziko library by the same author is also very interesting:
https://github.com/jemmybutton/fiziko
Since it has some pseudo-3D features, maybe you can learn from it.

Thanks for all this info. I will look into this and perhaps come up with a Metapost file, and then we can possibly add that in Wiki.
I do not know Lua, and I am too old to learn another programming language. These days, I program only in Rust/Javascript.

--
Respect,
Shiv Shankar Dayal