Grasshopper

generative modeling for Rhino

# Incremental 3d Convex Hull

Thanks to some theory on http://www.cse.unsw.edu.au/~lambert/java/3d/incremental.html

I managed to script an incremental 3d convex hull algorithm.

This is a part of "in-progress" script for k-means rationalization.

It's quite fast (1000 points in cloud = 1.1 sec, amd x6), accepts multiple branches/hulls, most complex math operation is sqrt(2) :) , and its really simple to use (one input, one output) ;)

Tags: 3d, convex, hull, incremental

Views: 2573

### Replies to This Discussion

really great work

Fantastic!  Thanks for sharing this...really fast and fun to play with.  Also, for Rhino 5 already, and I'm pretty sure for Rhino 4 in the next GH release, IsPointInside has been fixed.

there is so much more to do with meshes in gh: http://en.wikipedia.org/wiki/Conway_polyhedron_notation

I think I will try my best to implement these notations to gh... there is one major problem - no polygonal meshes in rhino...

after finals (only 40 days)...

There may be a very simple answer to this but would be greatful for any help, I'm a complete beginner in grasshopper. I've been playing around a bit with this script and now I'm trying to use it to generate a truss system similar to something like this http://designreform.net/2011/03/rhino-grasshopper-parametric-truss-... that uses the divisions of the hull mesh as the basis for the trusses instead of a shape mapped to a surface (so... not really similar at all). Anyone have any pointers on how I could go about trying to do this? I've tried to decompose the mesh and make polylines with the verticies but then I don't know how to offset them properly. I've tried an offset on srf but I can't use the mesh faces as surfaces. I attached an image showing my scripting attempt A, how I want to offset B and sort of my final goal C. As I'm sure you can tell I'm pretty clueless, any help would be greatly appreciated. (and thank you for the script!)

Attachments:

use weaverbird :

1. create hull

2. use picture frame component

fin!

Brilliant, exactly what I was looking for! Thanks so much for your help.

Hi Mateusz and others,

Thanks for the convex hull definition.

I just wanted to share this use of your script. I used it to perform rotations on a irregularly shaped Brep to approximate the effect of gravity. I needed to find a rotation that would be suitable for further stress tests. The script finds the four polygons with the largest surface area and lets you reorient your brep to accordingly. The should help minimizing loads and would probably be helpful for 3d printing as it allows the user to efficiently find the minimum Z value for an arbitrary form.

Attachments:

• View All