C++ VTK-椭圆内的二维点云
使用VTK,我想创建一个位于椭圆内的点云(随机数量) 到目前为止,我得到了这个:C++ VTK-椭圆内的二维点云,c++,vtk,C++,Vtk,使用VTK,我想创建一个位于椭圆内的点云(随机数量) 到目前为止,我得到了这个: vtkSmartPointer<vtkPointSource> pointSource = vtkSmartPointer<vtkPointSource>::New(); pointSource->SetCenter(0.0, 0.0, 0.0); pointSource->SetNumberOfPoints(nPoints); pointSource->SetRadius
vtkSmartPointer<vtkPointSource> pointSource = vtkSmartPointer<vtkPointSource>::New();
pointSource->SetCenter(0.0, 0.0, 0.0);
pointSource->SetNumberOfPoints(nPoints);
pointSource->SetRadius(radius);
pointSource->Update();
vtkSmartPointer pointSource=vtkSmartPointer::New();
点源->设置中心(0.0,0.0,0.0);
pointSource->SetNumberOfPoints(nPoints);
点源->设置半径(半径);
点源->更新();
但是,我想知道如何将其描述为椭圆形云。您可以使用VTK变换将点源球体转换为椭圆。以下是缩放平面的示例: