A 3-D Canvas Widget For Tcl/Tk
Originally written on 2005-08-15. Updated 2008-12-12:
The 3-D Canvas Widget provides Tk programs with 3-D graphics capabilities through the use of OpenGL. But the 3-D Canvas widget is not another thin wrapper around the OpenGL interface. This widget is a much higher-level abstraction. Just as the built-in canvas widget of Tk is a high-level abstraction of the X11 drawing routines, so too the 3-D Canvas widget is a high-level abstraction of OpenGL.
The project is still under active development. The interface
is stablizing, but users should be prepared for possible API
changes in the future. An interface freeze will likely not
occur until the end of 2005 at the earliest.
The 3dcanvas project is stable and has been in use and relatively
unchanged for several years. New contributors who want to expand
and enhance 3dcanvas are welcomed.
fossil clone http://3dcanvas.tcl.tk/fossil 3dcanvas.fossil mkdir 3dcanvas cd 3dcanvas fossil open ../3dcanvas.fossil
Or, if you don't want to mess with installing fossil (fossil is a self-contained, stand-alone binary and precompiled fossil binaries are available, so installation is trivial) then you can download the code as a ZIP archive as follows:
- Login as user "anonymous". The password is shown on the login page. (The reason for requiring login is to prevent spiders for downloading every historical version of 3dcanvas.
- Go to the timeline page and select a version of 3dcanvas that you want to download. Click on its link.
- Find the "ZIP archive" link on the baseline page. This will cause a ZIP archive containing the particular version of 3dcanvas you have selected to be built and downloaded.
Build using the steps shown below. (This procedure works on SuSE 9.2 - likely it also works on most other flavors of Unix.) Precompiled libraries and kits are not yet available but probably will be available within the next few weeks.
- Check out the source code from CVS.
- Create a sibling directory to the source code named bld.
- Check to the bld directory.
- Type: ../canvas3d/configure
- Type: make
- Type: wish ../canvas3d/demo/triangles.tcl
A timeline of changes is available online. There is also a wiki devoted to this widget. The wiki is currently empty but feel free to change that. Use the ticket entry form to report bugs or request new features.
Code contributions are welcomed. Write access to the CVS repository can be arranged by contacting email@example.com.