Grasshopper

algorithmic modeling for Rhino

I'm trying to generate 3d voronoi in a vb component because I'd like to use it to generate 3d connectivity relationships for a series of points, and am having a hard time navigating it.  I've figured out 2d connectivity through the delaunay methods, but can't seem to understand how to work the grasshopper.kernel.geometry.voronoi...is it possible to expose the same functionality as is in the 3d voronoi component through vb?  I plan on growing points out from a source in a loop, and recalculating connectivity to determine avenues of growth, so I can't really use the 3d voronoi component as I am in the attached...even if the connectivity doesn't get directly calculated, and I can figure out a way to have it return a list of cells as breps, I can navigate that no problem...

Views: 1108

Attachments:

Replies to This Discussion

Voronoi diagrams can be constructed quickly by first computing a Delaunay triangulation and then using the edges to find neighbours and minimize slicing operations. In 2D this is what I do. I never wrote a 3D Delaunay solver and as a result the 3D Voronoi solver in Grasshopper.Kernel.Geometry.Voronoi is not very fast because it doesn't operate based on a connectivity graph.

I'll have a look at your file later and see if I can help out more specifically.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks David.  I've gotten the 2d connectivity to work great from the grasshopper.kernel.geometry.delaunay you developed, but you're right in that what I'm looking to do is a simulation that relies on connectivity testing in 3d space...am I right that the "brute force" method applied in the component you've created is less pure-math and more of a plane intersection/boolean operation? I've been checking out qhull and seeing if there are any ways that I could in my limited ability call it from a gh script...it seems some folks have had success with it in the past using rhinoscript, but I'd love to do in the gh environment.

I don't use Brep Solid Booleans, that would take forever. Instead each Voronoi cell is a collection of convex polylines (facet boundaries) that are intersected with a Plane. This is fairly fast.

I attached a VB component which creates a 'random walk' of adjacent Voronoi cells in a point-cloud, making sure never to step on a point more than once. There was however a bug in the Voronoi solver which I just found and fixed, so this script probably won't work until the next release goes out. But you can still see how to find neighbours based on facets.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Whoa!  Thank you so much!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service