Prime gradient noise
AbstractProcedural noise functions are fundamental tools in computer graphics used for synthesizing virtual geometry and texture patterns. Ideally, a procedural noise function should be compact, aperiodic, parameterized, and randomly accessible. Traditional lattice noise functions such as Perlin noise, however, exhibit periodicity due to the axial correlation induced while hashing the lattice vertices to the gradients. In this paper, we introduce a parameterized lattice noise called prime gradient noise (PGN) that minimizes discernible periodicity in the noise while enhancing the algorithmic efficiency. PGN utilizes prime gradients, a set of random unit vectors constructed from subsets of prime numbers plotted in polar coordinate system. To map axial indices of lattice vertices to prime gradients, PGN employs Szudzik pairing, a bijection F: ℕ2 → ℕ. Compositions of Szudzik pairing functions are used in higher dimensions. At the core of PGN is the ability to parameterize noise generation though prime sequence offsetting which facilitates the creation of fractal noise with varying levels of heterogeneity ranging from homogeneous to hybrid multifractals. A comparative spectral analysis of the proposed noise with other noises including lattice noises show that PGN significantly reduces axial correlation and hence, periodicity in the noise texture. We demonstrate the utility of the proposed noise function with several examples in procedural modeling, parameterized pattern synthesis, and solid texturing.