A 3D scanning device comprises: a digital light encoding unit comprising a digital micromirror device for encoding a rapidly changing shape signal onto a light beam directed to an object, a shape of said signal being selected such that distortions thereof by a contoured object reveal three-dimensional information of said contour; a detector synchronized with said digital light processing unit for detecting reflections of said light beam from said object, and a decoder for determining a 3D shape of said object from distortions of said signal in said detected reflections.