import vtk
points = vtk.vtkPoints() # 定义一个点工具
points.InsertPoint(0, 329, 338, 45) # 使用InsertPoint可以插入点...#注意:points.InsertPoint(a, b, c, d)
#其中a表示点的序号,(b,c,d)表示点的三维坐标
points.InsertPoint(1, 328, 319, 46)
points.InsertPoint...(2, 300, 329, 96)
#定义曲线工具
#将前面的几个点插值拟合成一条曲线
spline = vtk.vtkParametricSpline()
spline.SetPoints(points...()
splineMapper = vtk.vtkPolyDataMapper()
splineMapper.SetInputConnection(splineSource.GetOutputPort...()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow