[vtkusers] plot a huge amount of spheres

Marcus D. Hanwell marcus.hanwell at kitware.com
Thu Aug 22 10:52:09 EDT 2013


On Thu, Aug 22, 2013 at 10:39 AM, curator <curator at gmx.de> wrote:
> Hi all,
>
> I am able to draw a vtkSphere with its own vtkSphere, vtkActor and vtkMapper
> equipped together. Now if I need several spheres, I add multiple instances
> of this stuff for each sphere and add them all up to the same renderer - so
> far, so good.
>
> Now I need to draw a really huge amount of spheres, which are all identical
> except the position. Is there any more efficient way to to that than just
> creating N vtkActors, N vtkMappers and N vtkSpheres?
>
I would suggest looking at the support for glyphing, the chemistry
module uses this to render glyphed spheres and cylinders for example.
Something available in ParaView is the point sprite plugin too, we are
using a variation that is more flexible in the Open Chemistry work
(point sprites are normally limited to 64 pixels in width I think)
with vertex buffer objects but an implementation has not yet been
merged into VTK master (I hope to get to this soon).

Hope that helps.

Marcus



More information about the vtkusers mailing list