Plankton

Plankton is a free and open library implementing the half-edge data structure for polygon meshes.

This way of storing the mesh connectivity information allows easier adjacency queries and supports mesh faces with any number of sides (Ngons), not just quads and triangles.

The plankton library is intended primarily to be referenced and used from scripts, but  basic GH components for conversion and topology extraction are provided, and more may be added at a future date.

Plankton is still very much a work in progress. This is a first release, and methods/features will change in future versions.

Currently most of the methods relate to extracting topology information from existing meshes, and converting between Rhino meshes and Plankton meshes, but the intent is to over time add more ways of actually modifying and building meshes.

Please share your thoughts and ideas in the forum...

download the latest release here:

https://github.com/meshmash/Plankton/releases/latest

This library is distributed under the terms of the GNU Lesser General Public License (LGPL).

(The source is available on GitHub here)

Copyright 2013 Daniel Piker and Will Pearson

For more on half-edges, see:

http://www.flipcode.com/archives/The_Half-Edge_Data_Structure.shtml

http://openmesh.org/Documentation/OpenMesh-2.0-Documentation/mesh_hds.html

http://www.graphics.rwth-aachen.de/media/papers/directed.pdf

Thanks to the people I have had many conversations about meshes with over the last few years that have really helped inspire and inform this work: including: Daniel Hambleton, John Harding, Kristoffer Josefsson, Harri Lewis, Giulio Piacentino, and especially Dave Stasiuk, who also shared code that helped get this working.

Principle of the remesh_planton_circles.gh script.

A while ago I found the remesh_planton_circles.gh script by Daniel Piker. I find this script really interesting as I am using it for my graduation and I am trying to figure out the logic behind it, which proves to be rather difficult because I have no experience with scripting whatsoever. What I (think I) understand so far is that it uses edge collapse/split based on the proximity to certain points that have been assigned certain desired length values for the Delaunay edges, based on inverse distance weighted interpolation. There is also a force that pulls the vertexes of the Delaunay to the input mesh. 
What I am not sure about is how the circle packing forces work in combination with the laplacian smoothing forces. Are the circle packing forces based on kangaroo's spring force system? Does the circle packing also use attraction or repulsion functions like the Powerlaw component does? And what is the benefit of using the laplacian smoothing forces? Are they necessary to create a tangent circle packing instead of a 'simple' circle packing that does not result in a tangent circle packing? Could anyone give me some insight as to how exactly this script works?

  • up

    Daniel Piker

    Hi Denise,

    The remeshing in this script is along the same lines described in this post. The combination of flip/split/collapse local operators for iterative remeshing has been around for a while, for example see this paper.

    The circle packing forces in this script are not simple springs, but are based on the ideas in this paper. Essentially it is a condition on the sums of the lengths of the 4 edges around each pair of adjacent triangles, and it adjusts the lengths to meet this condition.

    The Laplacian smoothing might not be necessary in this script - I just often include some amount in most types of mesh optimisation, as it is a simple way to keep meshes fairly regular.

    1