no display name and no $DISPLAY environment variable
    while executing
"load /enadisk/commun/linux/local/ActiveTcl-8.6.11/lib/libtk8.6.so Tk"
    ("package ifneeded Tk 8.6.11" script)
    invoked from within
"package require Tk"
    (in namespace eval "::request" script line 15)
    invoked from within
"namespace eval ::request $script"
    ("::try" body line 12)

OUTPUT BUFFER:

# Copyright: 2006-2010 Paul Obermeier (obermeier@tcl3d.org) # # See the file "Tcl3D_License.txt" for information on # usage and redistribution of this file, and for a # DISCLAIMER OF ALL WARRANTIES. # # Module: Tcl3D -> tcl3dOde # Filename: odeGravity.tcl # # Author: Paul Obermeier # # Description: Tcl3D Ode example: Bodies influenced by gravity. # Based on PyODE Tutorial 1 By Matthias Baas. package require Tk package require tcl3d 0.5.0 if { [info procs tcl3dHaveOde] ne "" } { if { ![tcl3dHaveOde] } { tk_messageBox -icon error -type ok -title "Error" \ -message "You do not have ODE installed." exit } } # 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 Cleanup {} { .fr.toglwin delete $::id1 $::id2 } proc ExitProg {} { exit } proc StartAnimation {} { if { [info exists ::animateId] } { return } set x1 0 set y1 2 set z1 0 set x2 1 set y2 2 set z2 0 set ::world [dWorldCreate] dWorldSetGravity $::world 0 -9.81 0 set body1 [dBodyCreate $::world] set body2 [dBodyCreate $::world] set M [new_dMass] dMassSetZero $M dMassSetSphere $M 2500 0.05 dMassAdjust $M 1.0 dBodySetMass $body1 $M dMassAdjust $M 1.5 dBodySetMass $body2 $M dBodySetPosition $body1 $x1 $y1 $z1 dBodyAddForce $body1 0 200 0 dBodySetPosition $body2 $x2 $y2 $z2 dBodyAddForce $body2 0 200 0 set ::total_time 0.0 set ::dt 0.04 animate $body1 $body2 } proc StopAnimation {} { if { [info exists ::animateId] } { after cancel $::animateId unset ::animateId } } proc animate { body1 body2 } { set pos [dBodyGetPosition $body1] set x1 [dReal_getitem $pos 0] set y1 [dReal_getitem $pos 1] set z1 [dReal_getitem $pos 2] .fr.toglwin coords $::id1 \ [expr 200 + $x1*100-5] [expr 600 - $y1*100-5] \ [expr 200 + $x1*100+5] [expr 600 - $y1*100+5] set pos [dBodyGetPosition $body2] set x2 [dReal_getitem $pos 0] set y2 [dReal_getitem $pos 1] set z2 [dReal_getitem $pos 2] .fr.toglwin coords $::id2 \ [expr 200 + $x2*100-5] [expr 600 - $y2*100-5] \ [expr 200 + $x2*100+5] [expr 600 - $y2*100+5] dWorldStep $::world $::dt set ::total_time [expr $::total_time + $::dt] update idletasks after 100 if { $y1 < 0.0 || $y2 < 0.0 } { StopAnimation } set ::animateId [tcl3dAfterIdle "animate $body1 $body2"] } # Master frame. Needed to integrate demo into Tcl3D Starpack presentation. frame .fr pack .fr -expand 1 -fill both canvas .fr.toglwin -width 400 -height 600 -bg white label .fr.info grid .fr.toglwin -row 0 -column 0 -sticky news grid .fr.info -row 1 -column 0 -sticky news grid rowconfigure .fr 0 -weight 1 grid columnconfigure .fr 0 -weight 1 # Watch For ESC Key And Quit Messages wm protocol . WM_DELETE_WINDOW "ExitProg" bind . "ExitProg" bind . <1> "StartAnimation" bind . <2> "StopAnimation" bind . <3> "StopAnimation" bind . "StopAnimation" set id1 [.fr.toglwin create oval -2 -2 -1 -1 -fill red] set id2 [.fr.toglwin create oval -2 -2 -1 -1 -fill red] .fr.toglwin create line 0 400 1000 400 wm title . "Tcl3D demo (ODE): Bodies with gravity" PrintInfo [format "Running on %s with Tcl %s" \ $tcl_platform(os) [info patchlevel]] if { [file tail [info script]] == [file tail $::argv0] } { # If started directly from tclsh or wish, then start animation. update StartAnimation }