The invention relates to a method for optically scanning the three-dimensional geometry of an object by means of triangulation, in which a pattern (9, 9′) is projected onto the object (7) to be scanned in order to obtain a 3D data set, and the projected pattern (9, 9′) is recorded in an image (40, 41). In a first step for the production of at least one first image (40), a first pattern (9) is projected and in a second step for the creation of at least one further image (40), a further pattern (9′) deviating from the first as regards position or shape is projected onto the object (7) to be scanned and the image (41) is created. The first image (40) and the further image (41) comprise at least one common point (44). The 3D data acquired from the images (40, 41) are merged in a subsequent step on the basis of the 3D data of the at least one common point (44) such that the 3D data acquired from said images (40, 41) agree at least with reference to the 3D data of the common point (44) in the 3D data set.