Moiré phenomena of different types are frequently encountered in electronic imaging. Most common are moiré effects that occur between periodic structures. These effects have been intensively investigated in the past, and their mathematical theory is today fully understood. The same is true for moiré effects between repetitive layers (i.e., between geometric transformations of periodic layers). However, although moiré effects that occur between random layers (Glass patterns) have long been recognized, only little is known today about their mathematical behavior. In this work we study the behavior of such moirés, and compare it with analogous results from the periodic case. We show that all cases, periodic or not, obey the same basic mathematical rules, in spite of their different visual properties. This leads us to a unified approach that explains both the behavior of Glass patterns in the stochastic case, and the well-known behavior of the moiré patterns in periodic or repetitive cases.