10 Feb
Posted by mfs in Free mobile cell phone applications |
Tags: s60v3
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)
RSS feed for comments on this post · TrackBack URI
Leave a reply