Skip navigation

Tag Archives: algorithm

[GH] 3D Voronoi for Grasshopper Update.

 

 

 

A symbolically critical pamphlet.

3d voronoi qhull dimitrie stefanescu

 

Deprecated. There’s a new version here.

More as a scripting experiment, when i was mucking about trying to make the delaunay triangulation work in grasshopper i somehow found the wonderfully complex qhull library which i promptly set to push and pull to get it to work with grasshopper. As advised on their website, the best way to do it is to call it as an external program, which is exactly what i’ve done:  no files are written or read, no dos windows pop up, everything’s smooth.

Given that you don’t have many complex operations in grasshopper after the solution is generated, you’ll be able to handle quite an impressive amount of points (say 200 on my three-year old toplap) in real time. If you add the simple planarSrf operation, then say 60-70 and it gets sloppy.

What you’ll need to do to get things rolling:

0. Download the 3dvqhull definition and example file, and remember not to use it for commercial purposes, share-alike whatever you do with it and take the time to give the proper credits:  :)

1. Download qhull, and unzip it in a folder of your choice.

2. Get going and search for “System.dll”. What you’re interested in is the 2.0 version which you’ll usually find in here: “C:\WINDOWS\Microsoft.NET\Framework\v2.0.5[...]\”. If you can’t find it, I’m amazed grasshopper works for you. Anyway, you can find and install it from here.

3. Add the newly found System.dll version 2.o as a referenced assembly of the qhull component in the definition file.refass

If it turns orange, it’s cool.

4. Write in the panel that is linked to the “path” input the full path to the qhull program qvoronoi. You don’t need to add the .exe extension, but you can do it if you feel confortable.

pathh

5. There’s just one more thing you should know: facets that contain the infinite vertex are omitted altogether, without remorse. So as to have as little facets tending towards infinitum, I always add the corners of the points bounding box to the input sites.

bbx

You can scale the bounding box in respect with its center, or you can just call the whole thing off – it’s your choice.

I think this just about covers everything. Take care and have fun.

didi out.

PS: Qhull does more than voronoi. So if you have the time to explore and test, please do – the package is very powerfull and it can be used for more than this.

dimitrie stefanescu

(right click save target as)

Delaunay Triangulation in Rhino‘s Grasshopper plugin.

It’s pretty straightforward. Just don’t input in the magic node duplicating points or everything will start blowing up.

def2

First one to make it output the voronoi diagram wins a candybar.

As I promised, I hand out some of the scripts I’ve written in the course of the latest project.

Massive unroll Script:

Select as many surfaces as you like and then unroll each one of them.

Download it.


Adaptive fenestration script:

An interesting script that cuts holes in a surface based on the relation with a given attractor(point). I used it to generate a porous membrane for my latest project.

Download it.


Those were some scripts that have actually proven to be quite stable…

Here are some other potentially super-bugged scripts:

Faceting. – Does the same as the adaptive fenestration script only it also “facets” the seed surface.

Ribs. – My attempt (quite sucesefull) at writing a honeycomb script.

Follow

Get every new post delivered to your Inbox.

Join 39 other followers