Hi Shiv and Fabrice,
On Dec 30, 2023, Shiv Shankar Dayal wrote: It would be nice to either support Metapost 3D or Asymptote.
On Dec 6, 2021, Fabrice L wrote: I would be very interested to see an example of a Metafun drawing made with the help of LuaTeX to speed up some calculations.
I made a module that draws 3D globes with MetaPost and Lua. This was my first step toward drawing general projections. If anyone would like to join this project, I’d love some help. The globes module is only about 300 lines of code, and most of the challenge was hiding paths and parts of paths that are on the back side of the globe. Anybody could get up to speed pretty quickly. (I am completely new to both MetaPost and Lua, so I tried to be very clear in my coding.) My goal is a drawing process which starts with Lua tables containing data in arbitrary coordinates. The data could be any number of dimensions, and need not be rectangular. (For the globes the data is latitude and longitude points on the countries' boundaries.) The tables could be from an outside source (like the geographic data) or it could be calculated in Lua (for graphing functions or doing simulations). Lua does all of the calculations to project this data down to two dimensional, rectangular coordinates. Lua then passes these two dimensional points, or paths made from them, to MetaPost. MetaPost uses the points and paths to draw dots, curves and areas, to place labels, etc. The only transformation performed by MetaPost is the final scaling for drawing everything on the page. You can find the globe module on GitHub: https://github.com/GavinPolhemus/luageo I am relatively new to Git as well, so have patience if you start commenting or contributing there. I’ll learn fastest if there are collaborators! Gavin