Graphics in Lua - an example using the gd library
Archive - Originally posted on "The Horse's Mouth" - 2009-08-02 18:35:10 - Graham EllisIn answer to the question "how would you generate graphics from Lua?" ... I would (personally) look at a binding to the gd library - http://luaforge.net/projects/lua-gd/ - as this is an excellent library, under the MIT license so there's no issue with ongoing licensing being different to Lua's.

The complete source code of the program I used to generate the image that illustrates this article is on our web site here. We will give you a brief introduction on our public Lua course; Computer Graphics (and the GD library) are something of a speciality of mine, so if you need to know more, please ask for an "extra day" or alert me ahead of time on a private course, and I'll be delighted to cover the topic!
For graphs (as opposed to graphics), look at http://luagraph.luaforge.net/ which is a binding to the Graphviz library. And there are also OpenGL, SDL and .pdf bindings ... see http://lua-users.org/wiki/LibrariesAndBindings