Grasshopper

algorithmic modeling for Rhino

bone microstructure and voronoi diagram... need help

Hello,

I would like to generate the TRABECULAR area in bone (on the picture) using Voronoi diagram (or cell, whatever) in the Grasshopper software.

I have a solid part file generated from micro CT data. 

Can I have your comments on how to generate trabecular-like Voronoi structure ? 

Views: 24793

Replies to This Discussion

If you can generate lines, curves, points, and surfaces where you want matter, here is an efficient strategy to turn it all into a nice solid mesh, using David Stasiuk's new Cocoon plugin for marching cubes that creates a spacial field around all the separate geometry objects and after the field combines together in space, it makes a surface along a single field value that wraps the thing up:

Cocoon is here:

http://www.grasshopper3d.com/forum/topics/bulge-free-metaballs-and-...

Attachments:

Thanks Nik, for your explanation: :)

Can someone please help me understand, how I would use the 200 Spaghetti lines (without the cylinder) and still create a Cocoon around the Spaghetti lines.

ie. how can I turn the 200 curves into a Brep?

TIA!

Attachments:

You can't run geometry through a Panel since it turns it to text:

To disable the cylinder shell just right click the BC (Brep Charge) component to gray out Enable. Forget about the very tweaky Cocoon Refinement component at first, possibly using MeshMachine instead which is slow but actually gives many fewer triangles and adaptive meshing for tight curves too. Neither are easy to adjust on a deadline!

Then you have to sneak up on workable settings, using only a few lines, or Grasshopper will freeze perhaps indefinitely for 200 lines with extreme settings, especially the CS (Cube Size) setting that can blow up into a huge number if your scale is big.

Cocoon gives lots of nearly flat split quad faces so I quadrangulated those for fun:

Or MeshMachine can refine the mesh to make it efficient:

Whereas the Cocoon Refine component will merely return an equally fine mesh with more equilateral triangles but no serious remeshing to rid so many tiny triangles where they are not needed? Actually, it does seem to remesh also:

David said he used some of Daniel's MeshMachine code in there.

Attachments:

Nik's suggestion for turning a line, point or curve driven structure into a useable mesh is a good one.

If you can work out the best way to represent the trabecular structure using lines, points and/or curves then you have this sorted.

I'm not sure it's a 3d Voronoi but perhaps this would be good enough?

Something similar was posted by Nick Tyrer recently... Nick's Photo

3D Voronoi was easy enough, after I point edited a single surface 10X10 UV divided (via Rebuild) NURBS sphere into the shape of a bone and used it to trim the lines that were first made in a bounding box around it:

It would also be fun to populate the interior with points that are equidistant via Kangaroo physics repulsion, though they then tend to just congregate on the surface so you have to add many more and then I assume cull those later, and then add a NURBS sphere to each point to do the metaball surfacing on to give a more or less perfect foam instead of all this chaos.

Attachments:

Interesting stuff:...... I also forgot to have a look at coc_150722_SimpleCurveDriver.gh in the Cocoon.zip. Unfortunately the amount of re-calculating time is not trivial. On my system its about 5 to 6 min. with each change of a new radius value to see the new resulting geometry.

Your scale is likely not tweaked with the right CS (Cube Size) setting, so try bringing that way up until the forms start to break up when you preview the direct output of Cocoon. None of these big components are easy to optimize, so most of the work is trial and error as it bogs down or even blows up. But when optimized it is workable in less than a minute, usually, for a couple hundred lines.

Thanks Nik for your detailed explanation.

.... ur right those 200 lines do indeed blow up the script.

1. I also arrived at the conclusion that a smaller selection set, worked better.

2. I'll have a look at the influence of geometry Scaling, not only for Cocoon but also the Exo -Cyto scripts.

I realize there is a considerable about of geometry that needs to be calculated. Its better to wait patiently, Hence I wont be tearing my hair out, since I have so little left to begin with. :)

cheers!

I've regularly detested Voronoi since it is usually based on lazy random points. When the random points cluster, you get silly little regions.

So! Kangaroo repulsion of points in 3D space (with a mellow falloff of exponent -4) inside a bone-shaped single surface brep (the same point edited 10X10 UV Rebuild modified sphere) with constrain to brep used, you practically get a geodesic dome along the surface and a nicely triangulated and thus terribly strong truss connecting to it inside:

Baking just the lines then lets you bulk them up using Cocoon marching cubes:

No more chaos there, just equilibrium and mild disorder as Kangaroo bounces things around before you stop its timer. You double click to reset it using the Boolean Toggle input, and right click activate the timer component to get it running.

I have to offset the original surface to avoid bumps on the shell when I include that as a force field object (metasurface). I could have filtered out any lines whose both ends fall on the surface, actually, for a less bulky result. I did have to Join the inner and outer mesh surfaces in Rhino, to formally make it a single mesh for a ClippingPlane to show it right:

I don't recall seeing anybody having done simple 3D trusses via Kangaroo repulsion, and a search was not fruitful, but it works! Since it's so uniform, my connectivity was just culling any lines not in a fairly narrow length range after Kangaroo considered full connectivity between each point and all the others.

The ideal connectivity will be six closest neighbors on the surface, and twelve closest neighbors in the interior, given that twelve spheres pack around one. This does give a heavier result, perhaps, and maybe not as springy.

Attachments:

For lines that intersect at their ends, you can also use rather fast Exoskeleton (ExoWireframe):

...which subdivision smooths well:

My line culling range is a bit off or else I could cull one of each of two lines whose center points are too similar to get rid of the dual triangulation.

This looks great... getting close to the new features from Autodesk...

Autodesk Within

I guess one more thing to make it even more bone-like would be to alter the density of the points so they are more dense towards the shell and less dense towards the centre. I think the density might also be influenced by the stresses that the bone experiences but that's getting really complicated!

Biology doesn't subscribe to Engineering. It's the other way around.

"Great art is born when Apollonian form and Dionysian ecstasy are held in balance, when our dreams of order and abandon come together. One tendency uninformed by the other can bring forth only coldness or chaos." - Michael Pollan

"Perhaps and not perhaps, the biggest difference that exists between eroticism and pornography is that eroticism is divine and offers an opportunity while pornography is infra-human and brings bad luck. The pornographer with the prematurely aged face of a turtle, a dirty old one-armed person impudently bald and warm offers you on street corners dirty postcards with his little turtle paw that he just barely dares take out of his jacket armored in filth. Eros, the god of love, on the other hand, stands up and raises his arm in the sky to show his microgemetic tie, the quiver that he carries hanging from his incorruptible alabaster neck." – Salvador Dali (The Erotic Metamorphoses, 1968)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service