99     assert(points.size()==0);
   100     assert(cells.size()==0);
   102     auto inpoints =  vtkSmartPointer<vtkPoints>::New();
   104     for (
int i=0; i<points_in.size(); i+=3)
   105       inpoints->InsertNextPoint(points_in[i], points_in[i+1], points_in[i+2]);
   109     auto aPolyData = vtkSmartPointer<vtkPolyData>::New();
   110     aPolyData->SetPoints(inpoints);
   113     auto delaunay = vtkSmartPointer<vtkDelaunay3D>::New();
   114     delaunay->SetInputData(aPolyData);
   116     auto dgrid=delaunay->GetOutput();
   119     auto npoints=dgrid->GetNumberOfPoints();
   120     auto ncells=dgrid->GetNumberOfCells();
   122     auto  vtkpoints=dgrid->GetPoints();
   123     for (
int i=0;i<npoints;i++)
   126       vtkpoints->GetPoint(i,x);
   127       points.push_back(x[0]);
   128       points.push_back(x[1]);
   129       points.push_back(x[2]);
   132     auto pts =  vtkSmartPointer<vtkIdList>::New();
   134     for (vtkIdType i=0;i<ncells;i++)
   136       dgrid->GetCellPoints(i,pts);
   137       cells.push_back(pts->GetId(0));
   138       cells.push_back(pts->GetId(1));
   139       cells.push_back(pts->GetId(2));
   140       cells.push_back(pts->GetId(3));