Coding for Mobile Platforms

Random thoughts, sometimes relevant to mobile programming.

  • Mobile Coder

  • Subscribe to Mobile Coder and receive notifications of new posts by email.

    Join 183 other followers

ShiVa PoC: Newton’s Cradle

Posted by error454 on 06/03/2012


This is an attempt to replicate a Newton’s Cradle device.

a newton's cradle

Click to run the demo

This is very similar to the rope sample provided by Stonetrip.  The ball bearings have spherical dynamics bodies and are attached to an anchor point on the ceiling.  The string is cosmetic only, it has no dynamics or anchor points.

The collision doesn’t happen like the real world counterpart despite my fiddling with dynamics parameters.  I believe a programmatic solution would not be difficult by simply detecting the last collision point and setting things to be stationary.  I didn’t go through the trouble with the programmatic solution since the goal was to see whether the dynamics system would handle the system automatically.

Get the source.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 183 other followers

%d bloggers like this: