1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
package require vtk
package require vtkinteraction
vtkXMesaRenderWindow renWin
vtkMesaRenderer ren
renWin AddRenderer ren
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
vtkConeSource cone
vtkMesaPolyDataMapper mp
mp SetInputConnection [cone GetOutputPort]
vtkMesaActor actor
actor SetMapper mp
ren AddActor actor
renWin Render
iren AddObserver UserEvent {wm deiconify .vtkInteract}
iren Initialize
# prevent the tk window from showing up then start the event loop
wm withdraw .
|