From http://art.yypm.com/lego/2.0.0/demos/box.html