Ruby and Graphics

[ LiB ]

Ruby and Graphics

Because Ruby is the new kid on the block, a number of the graphical Ruby projects are still very much under construction. The projects I will present in the next subsections have been around for a while, have proven their usefulness in a number of applications, and can be found packaged with good examples and documentation. In contrast to Python and Lua libraries, Ruby graphic libraries tend to be scientific or Web-based in nature.


I offered a quick look at this toolkit and OpenGL in Chapter 10. In addition to working with OpenGL, FXRuby can also work with Scintillaor at least with FXScintilla, which is FOX's wrapper around the Scintilla library.

More information on FXRuby can be found at its Website, at


Ruby/PGPlot is a Ruby interface to the PGPlot graphics library. PGPlot is, itself, a device-independent graphics package specifically designed for plotting graphs of publication quality. PGPlot is not public domain software, but it is available free of cost for non-commercial endeavors. It also has hooks into several other languages, including Ada, C, FORTRAN, and Python. Ruby/PGPLot relies on Numeric Ruby; the technologies and URLs are

  • Ruby/PGPlot.

  • Numeric Ruby.

  • PGPlot.


RubyDCL is a Ruby interface, written by T. Horinouchi, K. Kuroi, and K. Goto that hooks into the DCL scientific-graphics library. The interface supports all of DCLevery function and subroutineand, although much of the documentation is in Japanese, it does come with some English-language documents and support. Ruby DCL is part of a larger project, the Dennou Ruby Project, the purpose of which is to develop a suite of software that facilitates visual scientific simulations.

The DCL graphics library was originally written in FORTRAN and later ported into C, and Ruby DCL is actually the second version of the product built by Dennou. The first library, AdvancedDCL, was the experimental prototype for RubyDCL and is now obsolete.

RubyDCL, the Dennou Ruby Project, and the RubyDCL project page can be found online at the following links:

  • RubyDCL.

  • Dennou Ruby Project.

  • RAA RubyDCL Project Page. rhtml ? name =rubydcl.


GD is a library by Thomas Boutell that is used for dynamically creating graphic images, particularly PNG and JPEG images, and Libgd-Ruby is a package extension library that allows Ruby to wrap around GD. Libgd is written in C, and is considered freeware. It is dependent on several other libraries, including libc6, the GNU C Library, FreeType 2, the GD Graphics Library, and The Independent JPEG Group's JPEG runtime library. Details can be found at the following links:

  • Libgd-Ruby.

  • GD Library.

[ LiB ]

Game Programming with Pyton, Lua and Ruby
Game Programming with Pyton, Lua and Ruby
Year: 2005
Pages: 133 © 2008-2017.
If you may any questions please contact us: