scan 2D or 3D objects