VTK/Examples/Tcl/GeometricObjects/Sphere

From KitwarePublic

Jump to: navigation, search

Sphere.tcl

package require vtk
 
vtkXMLPolyDataWriter writer
 
#Generate a synthetic sphere
vtkSphereSource sphere
sphere SetThetaResolution 12
sphere SetPhiResolution 12
sphere SetRadius 5.0
sphere Update
 
#Write polydata file
writer SetInput [sphere GetOutput]
set filename "sphere.vtp"
writer SetFileName $filename
writer Update
Personal tools