Constraining physics for a buckyball -like simulation.

I would like to take some spheres to represent atoms,

and put 60 of them cosntrained in the boundary radius of a sphere,

and let them push each other around to rearrange themseles like a buckyball…

It could make intersting game objects as you could make the radius of the sphere just a bit stronger than the atomic force so when you interact with it it looks interesting.

here is a flash simulation.

What is the best way to do it?


Hi Zoom !

Thanks again for this great question.

Sorry I only thought of this now.

  1. have the inner sphere as a point collider (I mean a primitive sphere collider), no problem

  2. have gravity off

  3. now check this out. write a one line script that continually applies force, TOWARDS THE CENTER OF THE SPHERE

attach that script to the small balls.

it’s so obvious, sorry I only thought of it now

they will jiggle around in a really interesting way. You will have to very carefully set the distances meters and masses kilograms and force Newtons to realistic levels - I’m sure you’re expert at that

the result will be fantastic. I can’t wait to see this. I’m gonna do it myself now too!

  1. Also consider, try both physical force as mentioned in 3, and also try it with a script that just basically “restrains it” by hand to the surface (much like the restrain buttons on the rigidbody inspector panel. generally you don’t move an obkect which is physical but here you could

  2. note further that you could carefully modify the velocity of the object continuously so it is only on the plane tangent to the surface at any moment

What a great question this is. Thanks!

#Another approach …

I’m gonna mention another approach I would like to try here Zoom. I often try out “offscreen calculation-reality physics”.

We could make a flat surface. Add edges to stop the balls rolling out. Put the 60 balls inside this “tray”. Use gravity. Let the little bastards bounce around…

All of this happens offscreen, you never see it.

Then … map that action to the surface of the sphere. So, all the balls you SEE on ONSCREEN are not real, they are just puppets. Carry over the exact height, spin, velocity etc of the baking tray as the globe tangent.

Of course … here we’d have to deal with the projection. It could be that some natty projection like a Interrupted sinusoidal does the trick in pratcice. And what to do at the edges. It could be that the “real” tray balls wrap somehow. Another key fact is, you can never, anyway, actually see both sides of the ball at once! So you need only work 40 or so of them at a time, in a way, depending the use.

Bearing that in mind it’s possible the “offscreen calculation reality baking tray” could be a terrific solution! :slight_smile:

Anyway just a reminder that “offscreen working realities” coupled with a completely fake, maquette, on screen reality is often a awesome thing to play with. I love rigs like that. Cheers