Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/131.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ VTK-椭圆内的二维点云_C++_Vtk - Fatal编程技术网

C++ 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

使用VTK,我想创建一个位于椭圆内的点云(随机数量)

到目前为止,我得到了这个:

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变换将点源球体转换为椭圆。以下是缩放平面的示例: