Tuesday, February 17, 2009

Physics Engines and Multitouch

One of the most important design concerns in multi-touch interfaces is called "Super-Realism". Super-realism means that objects on the screen with which you interact demonstrate behavior rooted in, but not entirely limited by, real world physics.

For example, the pinching and stretching of photos - the quintessential multi-touch demo application - results in natural feeling shrinking and expanding of documents or pictures. In reality, pictures don't shrink or stretch when you touch them, but it feels realistic in multi-touch. That's an excellent example of super-realism.

Important to making super-realism work is basic physics. When you push and object across the screen it should travel a distance proportional to your push and decelerate to a stop. The sub-systems in multi-touch applications that make objects on the screen behave like real word objects are often called Physics Engines. Physics Engines for multi-touch are really starting to become important and the main purpose of this blog post is to bring your attention to a couple of them.

Thanks to a posting by another blogger I was made aware of a physics engine that’s' been developed by the Microsoft Technology Center for the Surface (see this video). This Physics Engine works with XNA. Anther physics engine for use on the Surface is being developed by Tiago Andrade e Silva for WPF developers (see this video). There are lots of other physics engines to choose from, just Google the term and you'll find what you are looking for. One last one I wanted to point people to is Crayon Physics which was developed for use with a stylus – it’s a lot of fun.

2 comments:

Robert Levy said...

Physics gives you realism. "Super-realism" requires going a step further, figuring out the user's intent, and then giving them precisely that. Ironically, this often means ditching the usage of a physics engine and hard-coding a few simple hand-tuned heuristics.

For example, when you flick something against the edge of ScatterView, physics would dictate that it should bounce back a distance proportional to it's speed when it hit the edge. But we can be smarter than that and assume that when the user flicks something against the edge of the screen, it's *not* because they want it to bounce around in a difficult to predict way... they just want the thing to get out of their way. So instead of realistic physics, we calculate a deceleration rate for the item that makes it stop smoothly at the edge of the screen with a 1" bounce to make it look pretty. To end users this gives a satisfying experience which they *think* is real physics, but it's actually much more advanced.

Dave said...

Hi Richard, thanks for the link to the video. Just to clarify, the first physics engine you mention is actually based on WPF and not XNA. It is implemented using a WPF layout control, analagous to the ScatterView control that ships with the Surface SDK.