Grasshopper

algorithmic modeling for Rhino

Hello, a post with trabecualr with voronoi again..

I am thinking about generating uniform point "inside the solid." 

That is, all points should be distributed uniformly along the shape of the structure.

How can I do this work ? 

Pop-3D may not be used since it generates a random set of points.

Thanks.

p.s. attached file is the solid I want to make points within.

Views: 36868

Attachments:

Replies to This Discussion

I'm using SolidPointCollide already and that's what it's tunneling through.

A lot of the 3D adaptive meshing has only been published lately as in 2010 I start to find density variable (anisotropic) centroidal Voronoi work, and some of that invokes higher dimensions in order to do the math!

At least when I get frustrated I found a program that lets me torture the Stanford Bunny:

http://blog.mmacklin.com/2012/06/27/2d-fem/

oh, it's just in your image above it shows OnMesh which tries to keep them On, not In the surface.

Here is a pretty good "bone" structure, an optimized Voronoi series using the fast native Grasshopper Voronoi3D component and a kludge where I trim Voronoi cells with the original brep after creating it in a bounding box around it, and that leaves the surface cells with an open face, but I can still calculate its center of area to do the Lloyd relation cycles that result in even point distribution in space. Without trimming the cells at the surface, it just wanders around outside the solid, having no relation at all to its surface. Using the common practice of obtaining a Boolean difference of the solid and the bounding box Voronoi failed to retain the inner cells.I also extended struts out to the surface.

Two thousand points, with many culled for being outside the solid, takes three minutes:

I'm maybe not answering the question as asked but the general question of how to regularly distribute 3D points inside a design object still requires a lot of development in Grasshopper compared to what is off the shelf push button easy, which is crappy random 3D Voronoi.

There are a few artifacts that arise when the trim fails to really delete the outer Voronoi cell surfaces even though it splits them fine each time. That results in sporadic single cycle extra points outside the surface that pull a few inner points a bit closer to the surface.

In between Lloyd's algorithm cycles if I move each point 50% or so towards the surface, since less than that doesn't do much, I hollow out the interior in favor of the surface, but it's not exactly surface adaptive 3D meshing since I lose the interior completely, seen here in cross section:

At least it doesn't blow up.

I tried supposedly very fast Qhull, via a VB script that accesses a program called qvoronoi.exe in the Qhull install folder, but it doesn't even output closed Voronoi cells to work with so the speed is dumb speed, mostly.

To fill your bone mesh with points, since it's a very complex structure, would require at least 10K points, here shown first created on the surface:

Do you now want those to enter the interior and stay nearly equidistant from each other? Or do you want to recreate the bone structure itself from scratch?

The SPM particle system plugin surface repulsion but only works on NURBS surfaces, not meshes, and NURBS surfaces don't work well for highly complex 3D scans of bone. Kangaroo and Kangaroo2 don't have surface repulsion so you would have to fill the mesh with not just 10K but 100K or 1M little balls and then cull the ones on the surface, to keep the points all inside.

I can convert your rough surface aliased bone scan into a smooth NURBS surface using Geomagic Freeform after smoothing it as 3D voxel clay, then using autosurfacing, but it's 8K patches joined into a closed polysurface which is 69MB.

The Freeform clay smoothed version made by embossing the whole surface to make it bigger to compensate for the loss of volume upon smoothing provides a nice basis for major mesh reduction to small file size meshes too, though since STL uses no compression, I still had to ZIP it.

Note how the standard ZBrush real time display is so smart, using a noisy white overlay on polygons but then adds more velvety fluff in concave edges and then makes glossy the convex edges, all in addition to specular highlights and shadows. Can Rhino do that?!

Also ZBrush is able with its new ZRemesher command to automatically create a nice quad mesh, here at 19K polygons and only 2MB file size:

Looks like T-Splines, but isn't so far. Might be able to convert it into a single T-Splines surface and see what it does converting to NURBS.

Attachments:

FYI: Autodesk Meshmixer also does a reasonable job using most formats its also FREE

http://www.meshmixer.com/download.html

I've been neglecting free and delightful MeshMixer since the manual was so outdated that I backed a Kickstarter video course and now have 16 hours to trudge through:

https://www.udemy.com/3d-printing-and-3d-design-using-autodesk-mesh...

It's brilliant how its clay brushes remesh on the fly. I find that the Freeform haptic arm fights me more than helps, much of the time.

Its very easy and seamless, with a little inflate and deflate brush you quickly get something new :)

Attachments:

A good example of filling a solid with points related to the surface yet without then requiring a super fine 3D mesh everywhere is this marching cubes related 3D tetrahedral mesh lookup table system from 2007 using predefined tetrahedra that are fairly uniformly proportioned, and they include a 2D model of the procedure to explain it better. This is what I personally would like to achieve in Grasshopper, but in fact also with full relaxation to a more even distribution since they seem to include both cube/square edges and their diagonals which are considerably different in length:

http://www.cs.berkeley.edu/~jrs/papers/stuffing.pdf

In the 2D Voronoi case, simple post processing can create something of an edge adaptive mesh, as a model for doing so in 3D:

It looks fine at 0.5X strength of moving the shortest ones the most % of their original length towards the closest point on the rectangle, and moving the longest ones very little, so we are creating an edge adaptive space warp that leaves the interior alone instead of creating a big hole there:

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service