Analysis By Synthesis: 3D Image Parsing Using Spatial Grammar And Markov Chain Monte Carlo