Lua Graphics Toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Francesco 7da648d76d Merge pull request #7 from markuman/master 5 years ago
arch remove deprecated make.patch. 5 years ago
debian Fix typo in email address for debian package 5 years ago
doc Add sphinx documentation 6 years ago
examples Don't let modules leak globals. 5 years ago
src Make rockspec build use luarocks' LUA_INCDIR. 5 years ago
.gitignore Implement a makefile rule to build a debian package 6 years ago
INSTALL Add support to compile and use the library with Lua5.1 instead of LuaJIT 5 years ago
LICENSE Add initial source code for the plot and native window module 6 years ago
Makefile add ArchLinux install part in Makefile 5 years ago
README.md Update README.md 6 years ago
contour.lua Don't let modules leak globals. 5 years ago
graph-toolkit-scm-1.rockspec Make rockspec build use luarocks' LUA_INCDIR. 5 years ago
init.lua Put back function definition that was accidentally removed... 5 years ago

README.md

Lua Graphics Toolkit

The Lua Graphics Toolkit is a Lua module for creating plots and graphical animations using a simple Lua interface. It works as a standard Lua module both on Windows and Linux systems. Currently only LuaJIT2 is officially supported and included in the binary releases.

The module use the AntiGrain Geometry library to achieve a very good quality in the rendering by using anti-aliasing and subpixel resolution.

All the functions are documented in the user manual and a few examples are provided in the git repository.

A simple interface is provided to plot functions but if required a very fine grained control of the plots can be achieved by adding graphical elements individually by specifying the colors, position and even the rendering pipeline. Bezier curves are supported out of the box thanks to the AGG library.

The module support also the customizations of the axis to add customized labels and even nested labels’ layers.

Plot’s legend are also supported albeit with some limitations (currently legends cannot be added inside the plot).

Animations

The module can be used also to create animations by using a mechanishs of layers and a few methods to add elements and clear the current layer.

To create an animations basically elements are just added into the plot. Then to create a new frame the current layer is cleared using the plot:clear() method and new elements can be added to compose the new frame. The “sync” properties can be changed to “false” to cumulate changes and call plot:flush() to update the window.

The possibility to create more layers can be used to create a fixed layer of graphical elements that remains fixed while a second layer is used for the animation.

History

The Lua Graphics Module was previously part of GSL Shell where it is still used. By looking at GSL Shell you can find more example of its utilisation.

Try It Out

You can easily try the Lua Graphics Toolkit on Windows by downloading the binary packages available in the github repository release page. This latter includes the graphical module and the LuaJIT executable. A debian package is also available for Linux.

Currently only LuaJIT2 is officially supported but nothing prevent to use the library with the standad Lua implementation (PUC-Rio).