You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
500 B
29 lines
500 B
2 years ago
|
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 .
|