Excludes:Python, Triangulation

Here, it is possible to define a texture as a synthetic randomized rough surface. This rough surface height profile h(x, y) creation is based on a centralized Gaussian distribution in space,

g(x,y) = e^{-\frac{1}{2}  \left( \frac{x}{c_x} \right )^2 -\frac{1}{2} \left( \frac{y}{c_y} \right )^2  },

which is randomly displaced while summed up and normalized. This process can be written in terms of the forward and backward Fourier transform (denoted by (.)^{\wedge} and (.)^{\vee}) as follows:

h(x,y) = C \left( g^{\wedge}(k_x, k_y) e^{i \phi(k_x, k_y)} \right)^{\vee}

The phase function \phi(k_x, k_y) is randomly chosen, or by an deterministic pseudo random number generator when setting the seed for the random number generator (see RandomSeed).

The scaling factor C is determined, so that the root mean square of the height profile function,

\mathrm{rms} = \lim_{l \rightarrow \infty} \frac{\int_{-l}^{l} \int_{-l}^{l}  h^2(x, y)\,\mathrm{d}x \, \mathrm{d}y}{\int_{-l}^{l} \int_{-l}^{l} 1\,\mathrm{d}x \, \mathrm{d}y}

equals the value passed in RMSHeight.


In case of a periodic computational domain the rough surface is constructed in a periodified manner.