can't find package tcl3d 0.3.3
    while executing
"package require tcl3d 0.3.3"
    (in namespace eval "::request" script line 12)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

# unproject.tcl # # An example of the OpenGL red book modified to work with Tcl3D. # The original C sources are Copyright (c) 1993-2003, Silicon Graphics, Inc. # The Tcl3D sources are Copyright (c) 2005, Paul Obermeier. # See file LICENSE for complete license information. # # When the left mouse button is pressed, this program # reads the mouse position and determines two 3D points # from which it was transformed. Very little is displayed. package require tcl3d 0.3.3 tcl3dConsoleCreate .tcl3dOutputConsole "# " "Unproject Output" # Font to be used in the Tk listbox. set listFont {-family {Courier} -size 10} # Show errors occuring in the Togl callbacks. proc bgerror { msg } { tk_messageBox -icon error -type ok -message "Error: $msg\n\n$::errorInfo" exit } # Print info message into widget a the bottom of the window. proc PrintInfo { msg } { if { [winfo exists .fr.info] } { .fr.info configure -text $msg } } proc CreateCallback { toglwin } { } proc DisplayCallback { toglwin } { glClear GL_COLOR_BUFFER_BIT glFlush } proc ReshapeCallback { toglwin { w -1 } { h -1 } } { set w [$toglwin width] set h [$toglwin height] glViewport 0 0 $w $h glMatrixMode GL_PROJECTION glLoadIdentity gluPerspective 45.0 [expr double($w)/double($h)] 1.0 100.0 glMatrixMode GL_MODELVIEW glLoadIdentity } proc MouseDown { x y } { set viewport [tcl3dOglGetViewport] set mvmatrix [tcl3dOglGetDoubleState GL_MODELVIEW_MATRIX 16] set projmatrix [tcl3dOglGetDoubleState GL_PROJECTION_MATRIX 16] # Note: viewport[3] is height of window in pixels set realy [expr [lindex $viewport 3] - $y - 1] puts "Coordinates at cursor are ($x, $realy)" set winList [gluUnProject $x $realy 0.0 $mvmatrix $projmatrix $viewport] puts [format "World coords at z=0.0 are (%f, %f, %f)" \ [lindex $winList 1] [lindex $winList 2] [lindex $winList 3]] set winList [gluUnProject $x $realy 1.0 $mvmatrix $projmatrix $viewport] puts [format "World coords at z=1.0 are (%f, %f, %f)" \ [lindex $winList 1] [lindex $winList 2] [lindex $winList 3]] } frame .fr pack .fr -expand 1 -fill both togl .fr.toglwin -width 500 -height 500 -double false \ -createproc CreateCallback \ -reshapeproc ReshapeCallback \ -displayproc DisplayCallback listbox .fr.usage -font $::listFont -height 2 label .fr.info grid .fr.toglwin -row 0 -column 0 -sticky news grid .fr.usage -row 1 -column 0 -sticky news grid .fr.info -row 2 -column 0 -sticky news grid rowconfigure .fr 0 -weight 1 grid columnconfigure .fr 0 -weight 1 wm title . "Tcl3D demo: OpenGL Red Book example unproject" bind . "exit" bind .fr.toglwin <1> "MouseDown %x %y" .fr.usage insert end "Key-Escape Exit" .fr.usage insert end "Mouse-L Get pick results" .fr.usage configure -state disabled PrintInfo [format "Running on %s with a %s (OpenGL %s, Tcl %s)" \ $tcl_platform(os) [glGetString GL_RENDERER] \ [glGetString GL_VERSION] [info patchlevel]]