Grasshopper

algorithmic modeling for Rhino

Inflate multiple balloons within a boundary volume (using Kangaroo).

As part of the Grasshopper2 material preview I'm looking to inflate several spheres until they fill up a boundary volume. Sphere volume is allowed to grow without bounds, but the total volume is of course limited to the boundary volume. Spheres are not allowed to intersect each other or themselves. I'd also like the sphere/balloon surfaces to appear to be under tension, so no sharp creases allowed. Some control over the balance between inflation pressure and surface tension will be required. Gravity optional.

Whoever comes up with the best solution will be listed as contributor.

Views: 32420

Replies to This Discussion

Lost the connection there earlier...here's the file.

Attachments:

This is great Dave! thanks for sharing.

A few ideas for possible improvements:

The current release does actually have a goal in the library called CollidePointMesh which can be used for 2-way collisions between meshes. The component SolidPointCollide selects between this and the older SolidPoint goal based on whether the Unidirectional input is true. (There's some more discussion here on one of the applications this was developed for).

Like the one in your definition, this checks if a point is inside a mesh, and if it is, it pushes it back to the surface. It also applies a corresponding inwards push to the face of the mesh, divided over its corners according to the barycentric coordinates of where on the face the vertex pushes.

For example, in the image below, without this second part the red mesh would get pushed away, but there would be no reaction force on the blue mesh, because none of its vertices were inside the red one. If the meshes have evenly distributed vertices it might not cause too much of a problem, but I think it is better to include it.

Also, even including the reactions this is still only an approximate collision detection for 3D, and it won't catch this sort of edge-edge intersection:

Though if the meshes are nice and smooth this isn't such an issue.

Also, one simple change that I think could give a significant speed improvement would be to compare the bounding boxes of pairs of meshes before looking at whether their individual vertices penetrate each other.

Nice! I didn't realise that there were two-way interactions. Checking the code, I can see how the Goal is working, maintaining the mesh internally and updating the vertex positions with each pass.

Great idea on the bounding boxes...particularly good for several meshes.

Hi

Thanks for sharing.

I learned very much from your baloons.

Here is your component in VB, as I am no good in C# :-(

Is there a documentation of the K2 ?

Attachments:

Hi David,

I have plugged it in my definition, but I have got this warning

"Error (CS1705): Assembly 'KangarooSolver, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null' uses 'RhinoCommon, Version=5.1.30000.13, Culture=neutral, PublicKeyToken=552281e97c755530' which has a higher version than referenced assembly 'RhinoCommon, Version=5.1.30000.10, Culture=neutral, PublicKeyToken=552281e97c755530'"

It is a version issue I think ? how can I get the latest one ?

Thanks ..

Attachments:
Yes, this error is most likely caused by not having the latest Rhino service release. I think the link to download this is found under the help/about menu in Rhino

Hello everyone,

I have exactly the same error and I have the latest versions of rhinoceros. Can anyone help me fix it? Thank you!

Are you absolutely sure you have the latest Rhino service release? You can check by clicking Help>About Rhinoceros, and then in the lower right there will be some info about the version, eg Version 5 SR12 64-bit


Thank you very much, it's true, I was wrong.

I have another question, how can I edit the number of spheres?

 

Awesome-sauce!! I did a lot of these bounded/inflating/colliding meshes in Maya/Nucleus about 5 years ago. As far as I recall it solved very fast and allowed one to interact with the system at very reasonable framerates. Considering how long ago that was (hardware-wise) it might make sense to have a closer look at how they implemented collisions:

http://www.autodeskresearch.com/pdf/nucleus.pdf
http://images.autodesk.com/adsk/files/autodeskmaya_nucleus_whitepap...

Hope you made it across the pond ok. Just got back to Copenhagen, so empty here :(
 

Yes, we made it all in one piece, more or less! You'll be around for at least part of August, right? Before you head up to Aarhus?

This is really just a super naive implementation meant to do something quick :)...in the most recent version I posted each Goal is set up to capture one mesh topology and all particle indices. Then it rebuilds the mesh at each iteration, and tests all particles for inclusion: so, not very efficient.

From my understanding, Nucleus can be set to use vertex-vertex collisions with a defined radius, which will run much quicker for sure, and works really well when the mesh has consistent and/or known edge lengths...much like Daniel's Raisin definition for managing self-collision when reducing volume. The issue here was that with each mesh inflating, one would need to dynamically adjust each vertex radius for this type of collision testing. I suppose it could be pretty straightforward to implement. Sometime when there's more time! :)

Guys, anybody!
I can't read this file: Inflate - 2spheres.gh. My Rhino makes crush!
Anybody can help me with that?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service