Using a Kangaroo Collision Simulation to space out 3D Voronoi

Hello everyone,

I have a 3D Voronoi structure in Grasshopper that I’m looking to run a collision simulation on using Kangaroo, in order to space out the individual Voronoi cells more evenly but not change the overall shape of the object.

I think the best way to tackle this is to drop the object to C-plane using a gravity-like simulation, with restrictions set to the object. However, I’m new to Kangaroo so am struggling as I haven’t been able to find a tutorial or another similar forum.

Any ideas?

Cheers Hamish

1 Like

Hi Hamish,
Do you mean you are using the Voronoi3d component on a collection of points filling some volume?
or you have a distribution of points on some curved surface?
Either way, I don’t see why it would be necessary to drop anything to the C-plane - you can use the SphereCollide component to distribute the points, while either keeping them inside a volume with SolidPtCollide, or on a Surface with OnMesh.

Hi Daniel,

I appreciate the quick reply, yes that’s exactly what I mean; using the Voronoi 3d component to join points within a volume.

Before I use it to create a mesh, I want to evenly spread out the points within the volume so the final outcome will be cleaner. Here’s what I have so far using SphereCollide and SolidPtCollide, seems to be getting there but still not right. You don’t happen to have any examples of it working do you?

Check out this thread

Here’s a simple definition
image distribute_pts_in_cube.gh (11.0 KB)
What is it that you are unhappy with in the result you are getting so far?

Capture123

Daniel,

This works, with some tinkering it’ll be spot on so thanks (ignore the error message in the image attached). The only thing I’m unhappy about is the inconsistency of the 3D Voronoi inside the volume (at the center).

On the outside of the cube, the Voronoi works connecting points how I want them. However, once the cell count is increased to a certain level of complexity, there becomes a strange empty space in the center that isn’t corrected by the simulation. Seems like the software can’t run a voronoi3D component with upwards of a few thousand cells. Have you seen this problem before?

Why are you using the bouncy solver rather than the regular one as in the file I posted above?

In that image at least, the solver is not running at all, and it is only because you have both the original and what would be the relaxed points (if it were running) connected to the Voronoi component that you are getting a result. You shouldn’t have that connection between Pop3d and Voronoi3d.

Kangaroo can relax a few thousand points no problem. The Voronoi3d component takes a while (20s for 3000pts on my machine) but it gets there:

Note that you need to adjust the radius of the spheres to suit the number. Start with it low and gradually increase until you see them pushing apart. If it is too high they will tend to bunch together on the surface of the cube.

2 Likes

I’ve added the regular solver into the agorithm, but there’s still empty space in the thickest area of the volume when I increase the spheres to over approx’ 2000. Even when the radius is minimized to below 0.01?

I’ve tried dividing the volume by the no. of cells and using that to determine the radius but no luck yet.