The BLT (http://www.tcltk.com/blt/) extension has this functionality. You can also try the all-tcl code by Donal Fellows at http://r8h.cs.man.ac.uk:8000/tcl/.