<div dir="ltr">Hello, I am attempting to placed number of actors (spheres) at various positions throughout the scene with the following routine<div><br></div><div><div>for (int i = 0; i < radii.size(); ++i) {</div><div>        vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New();</div><div>        sphereSource->SetRadius(radii[i]);</div><div>        sphereSource->SetPhiResolution(100);</div><div>        sphereSource->SetThetaResolution(100);</div><div>        sphereSource->Update();</div><div><br></div><div>        vtkSmartPointer<vtkPolyDataMapper> sphereMapper = vtkSmartPointer<vtkPolyDataMapper>::New();</div><div>        sphereMapper->SetInputConnection(sphereSource->GetOutputPort());</div><div><br></div><div>        vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();</div><div>        actor->SetPosition(start_pos[i].x(), start_pos[i].y(), start_pos[i].z());</div><div>        actor->SetMapper(sphereMapper);</div><div>        actor->GetProperty()->SetInterpolationToFlat();</div><div>        actor->GetProperty()->SetFrontfaceCulling(true);</div><div><br></div><div>        actors.push_back(actor);</div><div><br></div><div>    }</div></div><div><br></div><div><div>//Set up renderer</div><div>    vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();</div><div><br></div><div><br></div><div>    // Create new camera</div><div>    vtkSmartPointer<vtkCamera> camera = vtkSmartPointer<vtkCamera>::New();</div><div>    renderer->SetActiveCamera(camera);</div><div><br></div><div>    for (int j = 0; j < radii.size(); ++j) {</div><div>        renderer->AddActor(actors[j]);</div><div>    }</div></div><div><div>//Set up renderer</div><div>    vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();</div><div><br></div><div><br></div><div>    // Create new camera</div><div>    vtkSmartPointer<vtkCamera> camera = vtkSmartPointer<vtkCamera>::New();</div><div>    renderer->SetActiveCamera(camera);</div><div><br></div><div>    for (int j = 0; j < radii.size(); ++j) {</div><div>        renderer->AddActor(actors[j]);</div><div>    }</div></div><div><br></div><div>...</div><div><br></div><div><div>this->ui->widget->GetRenderWindow()->AddRenderer(renderer);</div><div>}</div></div><div><br></div><div>But when rendered I get all spheres superimposed on top of each other and when the camera movies they appear to turn about their individual origins - which is not the desired outcome, rather that they should be placed at their respective coordinates in 3D space.</div><div><br></div><div>Any help with this would be greatly appreciated</div><div><br></div><div>.. Mads</div></div>