Back to main page

A Maxima-VTK interface

This is a proof of concept for a Maxima-VTK interface.

Gnuplot and VTK are very different and I am trying to use the same syntax, the same graphics objects, and the same options. Despite my efforts, sometimes it is very difficult, or even impossible, to maintain 100% syntax compatibility. The main reason for developing this package is to make better graphics in 3D with Maxima, since Gnuplot is not a good program for this task.

This web site is presently the only source of information available for this (experimental) VTK interface.

Setting up VTK

This interface is part of the draw package and I have tested it in Debian, Ubuntu and Windows.

In Debian, once Maxima is installed, execute from command line:

sudo apt-get install vtk-tcl
and you are done.

Note that in Ubuntu the command is:

sudo apt-get install tcl-vtk

In Windows, download first the installer and execute it. You have then to include vtk.exe in the path following these steps:

  1. From the desktop, right click My Computer and click Properties.
  2. In the System Properties window, click on the Advanced tab.
  3. In the Advanced section, click on the Environment Variables button.
  4. Finally, in the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button. Add the new path, for example:
    ;C:\Program Files\VTK 5.6\bin

Drawing with VTK

Once you have opened a Maxima session, load package draw and then set global variable draw_renderer to vtk:

load("draw") $
draw_renderer : vtk $

The default value of draw_renderer is gnuplot. If you do not change this value, draw will call always the Gnuplot renderer.

Note that you need Maxima 5.24 in order to run these examples.


This on-line manual gives examples for extending function draw3d. I hope you'll enjoy it.

What's new
by Mario Rodríguez Riotorto