Precise spatial measurement for the perfect illusion