Verlet
by Andreas Blixt

Real-world physics in Python using the accelerometer. Even better effect than the well-known Bouncing Ball script.

What you should see is a box that’ll move in whatever direction that the phone is tilted. So if you tilt it right, it’ll slide to the right of the screen, and the velocity will vary depending on the amount of tilt. In addition to this, it also applies forces from the acceleration of your phone. So if you hold your phone upright so that the box falls to the bottom of the screen, then move your phone quickly upwards and stop abruptly, the box will fly upwards as you’d expect.

This has only been tested on an N95 8GB and since this is the first Python script I’ve attempted I’d appreciate input on my code.”

Download :

verlet.zip (2 KB)

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Live
  • Ma.gnolia
  • MyShare
  • Reddit
  • Socialogs
  • SphereIt
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb
Related posts :
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...