曲线插值是输入一些点之后,vtk可以生成一条曲线穿过这些点
其中,设置//spline->ClosedOff();这里取消注释就会生成闭合曲线,可以自己试试。
#include "vtkActor.h"
#include "vtkCamera.h"
#include "vtkCellArray.h"
#include "vtkPoints.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper.h"
#include "vtkPolyDataWriter.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkProperty.h"
#include "vtkTubeFilter.h"
#include "vtkParametricSpline.h"
#include "vtkParametricFunctionSource.h"
#include "CommonTools/Com