To form a diffraction-free beam with a complex structure, we propose to use a set of primitives calculated iteratively for the ring spatial spectrum. We also optimized the complex transmission function of the diffractive optical elements (DOEs), which form some primitive diffraction-free distributions (for example, a square or/and a triangle). The superposition of such DOEs supplemented with deflecting phases (a multi-order optical element) provides to generate a diffraction-free beam with a more complex transverse intensity distribution corresponding to the composition of these primitives. The proposed approach has two advantages. The first is the rapid (for the first few iterations) achievements of an acceptable error in the calculation of an optical element that forms a primitive distribution compared to a complex one. The second advantage is the convenience of reconfiguration. Since a complex distribution is assembled from primitive parts, it can be reconfigured quickly or dynamically by using a spatial light modulator (SLM) by moving and rotating these components. Numerical results were confirmed experimentally.