title: How to detect iPhone movement in space using accelerometer?
body: <p>I am trying to make an application that would detect what kind of shape you made with your iPhone using accelerometer.
  As an example, if you draw a circle with your hand holding the iPhone, the app would be able to redraw it on the screen.
  This could also work with squares, or even more complicated shapes.
  The only example of application I've seen doing such a thing is AirPaint (<a href="http://vimeo.com/2276713" rel="noreferrer">http://vimeo.com/2276713</a>), but it doesn't seems to be able to do it in real time.</p>
  
  <p>My first try is to apply a low-pass filter on the X and Y parameters from the accelerometer, and to make a pointer move toward these values, proportionally to the size of the screen.
  But this is clearly not enought, I have a very low accuracy, and if I shake the device it also makes the pointer move...</p>
  
  <p>Any ideas about that ?
  Do you think accelerometer data is enought to do it ? Or should I consider using other data, such as the compass ?</p>
  
  <p>Thanks in advance !</p>