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.
40 lines
707 B
40 lines
707 B
2 years ago
|
package require vtk
|
||
|
package require vtkinteraction
|
||
|
|
||
|
# Create the RenderWindow, Renderer and both Actors
|
||
|
vtkRenderer ren1
|
||
|
vtkRenderWindow renWin
|
||
|
renWin AddRenderer ren1
|
||
|
vtkRenderWindowInteractor iren
|
||
|
iren SetRenderWindow renWin
|
||
|
|
||
|
vtkPoints points
|
||
|
points InsertPoint 0 0.0 0.0 0.0
|
||
|
|
||
|
vtkCellArray verts
|
||
|
verts InsertNextCell 1
|
||
|
verts InsertCellPoint 0
|
||
|
|
||
|
vtkPolyData polyData
|
||
|
polyData SetPoints points
|
||
|
polyData SetVerts verts
|
||
|
|
||
|
vtkPolyDataMapper mapper
|
||
|
mapper SetInput polyData
|
||
|
|
||
|
vtkActor actor
|
||
|
actor SetMapper mapper
|
||
|
[actor GetProperty] SetPointSize 8
|
||
|
|
||
|
ren1 AddViewProp actor
|
||
|
|
||
|
renWin Render
|
||
|
|
||
|
# prevent the tk window from showing up then start the event loop
|
||
|
wm withdraw .
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|