[vtkusers] How to create a closed surface enclosing a set of 3D points

David Doria daviddoria at gmail.com
Fri Jan 16 16:26:39 EST 2015


On Fri, Jan 16, 2015 at 4:19 PM, Totte Karlsson <totte at dunescientific.com>
wrote:

> Hello,
> I'm working on creating a simple visual model of small molecules. A first
> simple representation (simpler than a ball and stick representation) that I
> would like to create is to have a single surface enclosing all the atoms.
> This surface would be created such that 1) all atoms are found inside the
> surface and  2) the surface should resemble the "shape" of the molecule.
>
> Any pointers on how one can create such a surface, from a set of 3D
> coordinates (the atoms)?
>
> A first approximation could be to create a sphere, with a diameter large
> enough to enclose all atoms. However, if one have a molecule that is more
> like a tube, a tube would look better.
>
> Perhaps there are some vtk algorithms one could use to get a custom shape,
> tailor made for any molecule??
>
> tk
>

Here are a few native VTK options:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ConvexHull_ShrinkWrap
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ConvexHull_vtkHull
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Modelling/Delaunay3D

Or you could use Poisson Reconstruction:

http://www.vtkjournal.org/browse/publication/718
https://github.com/daviddoria/PoissonReconstruction

In both cases, I think your points will end up ON the surface, so you might
need to do a little scaling/fudging after the fact if you truly want the
points to be "inside".

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150116/ab6d154d/attachment.html>


More information about the vtkusers mailing list