Tk3D Software: Description

What is Tk3D?

Tk3D is a collection of extensions to Tcl/Tk that allow Tcl/Tk applications to manipulate large numerical arrays and generate 3D graphic displays.

What packages does it contain?

The Tk3D suite contains five packages, named Tns, Vtd, Fct, Fctr, and Tnsph. The "Tns" (tensor) package is a numerical array extension. It provides facilities for efficiently manipulating multidimensional arrays of numbers within Tcl. The Vtd package provides a Tk widget, called a view3d widget, in which to display 3D graphic images. This widget's functionality can be extended by adding "renderers," which are programs, written in C, for drawing objects in a view3d widget.

In addition, the Tk3D graphics suite contains several support packages and extensions that are useful in their own right. The Fct (faceted object) package implements a kind of faceted surface model. Faceted objects contain a list of three-dimensional vertices and lists of lines, triangles, and quads. The line/triangle/quad lists indicate how the vertices are connected together to form surfaces. Although the intended purpose of the Fct package is to provide display lists for the view3d widget, it was written as display-independent code; it can, in fact, be run from tclsh without Tk, so that displays can be built and manipulated offline. Display of faceted objects is performed by the Fctr (faceted object rendering) package, which extends the view3d widget with a faceted object renderer. Finally, the Tnsph (tensor-to-photo) package facilitates transfer of data between tensors (as provided by the Tns package) and Tk's photo image objects. This allows the user to transfer a native Tk image into a tensor, perform image processing operations, and then convert the processed image back into a Tk image.

Where do I get the code?

The extensions that constitute the Tk3D suite are available in source form and have been run on Windows and on several flavors of Unix. Before downloading, you must first read and agree to the License Agreement; you can then access the code.