mathematical functions for scripting in LDCad


RE: mathematical functions for scripting in LDCad
#4
(2018-03-14, 16:57)Joscha Wrote: It doesn't seem to support algebraic functions.

The default lua math library is very limited, but the beauty of a scripting language is you can extend it with the things you need. Ether by using a thirdparty library or by writing one your self.

If all you need is matrix and vector math I did add support for that through the ldc module as LDraw is heavily depended on matrix math.

But the ldc matrix math is highly targeted on LDraw usage, so if you need more complicated things you might need to use something like:
https://github.com/anaef/lua-linear

But this would require you to compile a .dll (window) or .so (Linux). There might also be a pure lua module for this out there, but I couldn't find it during a quick web search.

If you go the compile route be sure to match the main executable 32 or 64 bit wise. And use the lua 5.3 headers.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: mathematical functions for scripting in LDCad - by Roland Melkert - 2018-03-14, 18:33

Forum Jump:


Users browsing this thread: 1 Guest(s)