LuaTree: Draw Maxima objects as trees (using Lua; 2022, obsolete!)To draw Maxima objects as trees - as in the first screenshot below - I used a program that is made of three files: luatree.mac, luatree.lisp, luatree.lua. Its git repository is here, and you can test it by running the test block at the end of luatree.mac. There is an explanation of luatree here. The screenshot at the right below shows a (primitive) port of luatree to SymPy. Its code is here: luatree.py. Update: LuaTree is obsolete!!! Use LispTree instead!!!!!!!!!!!!
Also, the output of LuaTree was not very nice: it didn't distinguish strings and symbols, and it didn't distinguish all kinds of symbols... and when it received something like a(b)(c) or a[b][c] it simply aborted with an error. |