Elements of a machine are moved relative to one another along several axes. A monitoring device receives groups of position values of the axes which specify the relative position of the elements to one another. The surfaces and/or volumes of the elements taking up working space are determined therefrom. The monitoring device checks whether a collision risk between the elements exists. The monitoring device models at least parts of the surfaces of the elements with two-dimensional splines defined by nodes and checkpoints. The monitoring device further determines from the checkpoints of the splines for sections envelopes which envelop respective element in the respective section, and uses the respective envelope as a surface that is taken up by the respective element in the respective section. Boundary lines of faces of the envelopes are straight connecting lines of the checkpoints.