Beside functions for analysis of measured data, Gwyddion provides several generators of artificial surfaces that can be used for testing or simulations also outside Gwyddion.

All the surface generators share a certain set of parameters, determining the dimensions and scales of the created surface and the random number generator controls. These parameters are described below, the parameters specific to each generator are described in the corresponding subsections.

Image parameters:

- Horizontal, Vertical size
The horizontal and vertical resolution of the generated surface in pixels.

- Square image
This option, when enabled, forces the horizontal and vertical resolution to be identical.

- Width, Height
The horizontal and vertical physical dimensions of the generated surface in selected units. Note square pixels are assumed so, changing one causes the other to be recalculated.

- Dimension, Value units
Units of the lateral dimensions (Width, Height) and of the values (heights). The units chosen here also determine the units of non-dimensionless parameters of the individual generators.

Clicking this button fills all the above parameters according to the current channel.

Note that while the units of values are updated, the value scale is defined by generator-specific parameters that might not be directly derivable from the statistical properties of the current channel. Hence these parameters are not recalculated.

- Replace the current channel
This option has two effects. First, it causes the dimensions and scales to be automatically set to those of the current channel. Second, it makes the generated surface replace the current channel instead of creating a new channel.

- Start from the current channel
This option has two effects. First, it causes the dimensions and scales to be automatically set to those of the current channel. Second, it makes the generator to start from the surface contained in the current channel and modify it instead of starting from a flat surface. Note this does not affect whether the result actually goes to the current channel or a new channel is created.

Random generator controls:

- Random seed
The random number generator seed. Choosing the same parameters and resolutions and the same random seed leads to the same surface, even on different computers. Different seeds lead to different surfaces with the same overall characteristics given by the generator parameters.

Replaces the seed with a random number.

- Randomize
Enabling this option makes the seed to be chosen randomly every time the generator is run. This permits to conveniently re-run the generator with a new seed simply by pressing

**Ctrl-F**(see keyboard shortcuts).

The spectral synthesis module creates randomly rough surfaces by constructing the Fourier transform of the surface according to specified parameters and then performing the inverse Fourier transform to obtain the real surface. The generated surfaces are periodic (i.e. perfectly tilable).

The Fourier image parameters define the shape of the PSDF, i.e. the Fourier coefficient modulus, the phases are chosen randomly. At present, all generated surfaces are isotropic, i.e. the PSDF is radially symmetric.

- RMS
The root mean square value of the heights (or of the differences from the mean plane which, however, always is the z = 0 plane). Button Like Current Channel sets the RMS value to that of the current channel.

- Minimum, maximum frequency
The minimum and maximum spatial frequency. Increasing the minimum frequency leads to “flattening” of the image, i.e. to removal of large features. Decreasing the maximum frequency limits the sharpness of the features.

- Enable Gaussian multiplier
Enables the multiplication of the Fourier coefficients by a Gaussian function that in the real space corresponds to the convolution with a Gaussian.

- Enable Lorentzian multiplier
Enables the multiplication of the Fourier coefficients by a function proportional to 1/(1 + k

^{2}T^{2})^{3/4}, where T is the autocorrelation length. So, the factor itself is not actually Lorentzian but it corresponds to Lorentzian one-dimensional power spectrum density which in turn corresponds to exponential autocorrelation function (see section Statistical Analysis for the discussion of autocorrelation functions). This factor decreases relatively slowly so the finite resolution plays usually a larger role than in the case of Gaussian.- Autocorrelation length
The autocorrelation length of the Gaussian or Lorentzian factors (see section Statistical Analysis for the discussion of autocorrelation functions).

- Enable power multiplier
Enables multiplication of Fourier coefficients by factor proportional to 1/k

^{p}, where k is the spatial frequency and p is the power. This permits to generate various fractal surfaces.- Power
The power p.

The object placement method permits to create random surfaces composed
of features of a specific shape. The algorithm is simple: the given
number of objects is placed on random positions at the surface. For each
object placed, the new heights are changed to
max(z, z_{0} + h), where
z is the current height at a specific
pixel, h is the height of the object at this
pixel (assuming a zero basis) and z_{0}
is the current minimum height over the basis of the object being placed.
The algorithm considers the horizontal plane to be filled with identical
copies of the surface, hence, the generated surfaces are also periodic
(i.e. perfectly tilable).

- Shape
The shape (type) of placed objects. At present the possibilities include half-spheres, boxes, pyramids, tetrahedrons and some more weird shapes.

- Coverage
The average number of times an object covers a pixel on the image. Coverage value of 1 means the surface would be exactly once covered by the objects assuming that they covered it uniformly. Larger values mean more layers of objects – and slower image generation.

- Size
The lateral object size, usually the side of a containing square.

- Aspect Ratio
The ratio between the x and y dimensions of an object – with respect to some default proportions.

Changing the aspect ratio does not always imply mere geometrical scaling, e.g. objects called nuggets change between half-spheres and rods when the ratio is changed.

- Height
A quantity proportional to the height of the object, normally the height of the highest point.

Checking Scales with size makes unperturbed heights to scale proportionally with object size. Otherwise the height is independent on size.

Button Like Current Channel sets the height value to a value based on the RMS of the current channel.

- Orientation
The rotation of objects with respect to some base orientation, measured counterclockwise.

- Truncate
The shapes can be truncated at a certain height, enabling creation of truncated cones, pyramids, etc. The truncation height is given as a proportion to the total object height. Unity means the shape is not truncated, zero would mean complete removal of the object.

Each parameter can be randomized for individual objects, this is controlled by Variance. For multiplicative quantities (all except orientation and truncation), the distribution is log-normal with the RMS value of the logarithmed quantity given by Variance.

Random uncorrelated point noise is generated independently in each pixel. Several distributions are available.

- Distribution
The distribution of the noise value. The possibilities include Gaussian, exponential, uniform and triangular distributions.

- Direction
The noise can be generated as symmetrical or one-sided. The mean value of the distribution of a symmetrical noise is zero, i.e. the mean value of data does not change when a symmetrical noise is added. One-sided noise only increases (if positive) or decreases (if negative) the data values.

- RMS
Root mean square value of the noise distribution. More precisely, it is the RMS of the corresponding symmetrical distribution in the case the distribution is one-sided.

Line noise represents noise with non-negligible duration that leads to typical steps or scars (also called strokes) in the direction of the fast scanning axis. Parameters Distribution, Direction and RMS have the same meaning as in Point noise. Other parameters control the lateral characteristics of the noise.

Two basic line defect types are available: steps and scars. Steps represent abrupt changes in the value that continue to the end of the scan (or until another step occurs). Scars are changes of the value with a finite duration, i.e. the values return to the original level after some time.

Steps have the following parameters:

- Density
Average number of defects per scan line, including any dead time (as determined by parameter Within line).

- Within line
Fraction of the time to scan one line that corresponds to actual data acquisition. The rest of time is a dead time. Value 1 means there is no dead time, i.e. all steps occur within the image. Value 0 means the data acquisition time is negligible to the total line scan time, consequently, steps only occur between lines.

- Cumulative
For cumulative steps the random step value is always added to the current value offset; for non-cumulative steps the new value offset is directly equal to the random step value.

Scars have the following parameters:

- Coverage
The fraction of the the image covered by defect if they did not overlap. Since the defect may overlap coverage value of 1.0 does not mean the image is covered completely.

- Length
Scar length in pixels.

- Variance
Variance of the scar length, see Objects for description of variances.

Regular geometrical patterns represent surfaces often encountered in microscopy as standards or testing samples such as ridges, steps or holes. Each type of pattern has its own set of geometrical parameters determining the shape and dimensions of various part of the pattern. Each parameter has a variance control, similar to Object synthesis, that permits to make the pattern irregular in some aspects.

The placement of the pattern in the horizontal plane is controlled by parameters in tab Placement, common to all pattern types:

- Orientation
The rotation of the pattern with respect to some base orientation, measured counterclockwise.

This tab also contains the deformation parameters. While enabling the variation of geometrical parameters makes the generated surface somewhat irregular the shape of its features is maintained. Deformation is a complementary method to introduce irregularity, specifically by distorting the pattern in the xy plane. It has two parameters:

- Amplitude
The magnitude of the lateral deformation. It is a relative numerical quantity essentially determining how far the deformation can reach.

- Lateral scale
The characteristic size of the deformations. It describes not how far the features are moved but how sharply or slowly the deformation itself changes within the horizontal plane.

The columnar film growth simulation utilises a simple Monte Carlo deposition algorithm in which small particles are incident on the surface from directions generated according to given paramerters, and they stick to the surface around the point where they hit it, increasing the height there locally. The shadowing effect then causes more particles to stick to higher parts of the surface and less particles to the lower parts. This positive local height feedback leads to the formation of columns. The algorithm considers the horizontal plane to be filled with identical copies of the surface, hence, the generated surfaces are also periodic (i.e. perfectly tilable). The surface generator has the following parameters:

- Coverage
The average number of times a particle is generated above each surface pixel.

- Height
Local height increase occurring when the particle sticks to a pixel. Since the horizontal size of the particle is always one pixel the height is measured in pixels. A height of one pixel essentially means cubical particles, as far as growth is concerned. From the point of view of collision detection the particles are considered infinitely small.

- Inclination
Central inclination angle with which the particles are generated (angle of incidence). The value of zero means very small angles of incidence have the highest probability. Large values mean that the particles are more likely to impinge at large angles than at small angles. But for large direction variance, the distribution is still isotropic in the horizontal plane.

- Direction
Central direction in the horizontal plane with which the particles are generated. Large variance means the distribution is isotropic in the horizontal plane; for small variances the growth is anisotopic.

- Relaxation
Method for determination of the pixel the particle will finally stick to. Two options exist at this moment. Weak relaxation, in which only the two pixels just immediately before collision and after collision are considered and the particle sticks to the lower of them. In the case of strong relaxation, a 3×3 neighbourhood is considered in addition. The particle can move to a lower neighbour pixel with a certain probability before sticking permanently.

The wave synthesis method composes the image using interference of waves from a number of point sources. Beside the normal cosine wave, a few other wave types are available, each having a cosine and sine form that differ by phase shift π/2 in all frequency components. When the wave is treated as complex, the cosine form is its real part and its sine form is its imaginary part.

The generator has the following options:

- Quantity
Quantity to display in the image. Displacement is the sum of the real parts. Amplitude is the absolute value of the complex wave. Phase is the phase angle of the complex wave.

- Number of waves
The number of point sources the waves propagate from.

- Wave form
One of the wave forms described above.

- Amplitude
Approximate amplitude (rms) of heights in the generated image. Note it differs from the amplitude of individual waves: the amplitude of heights in the generated image would grow with the square root of the number of waves in such case, whereas it in fact stays approxiately constant unless the amplitude changes.

- Frequency
Spatial frequency of the waves. It is relative to the image size, i.e. the value of 1.0 means wavelength equal to the lenght of the image side.

- X center, Y center
Locations of the point sources. Zero corresponds to the image centre. The positions are also measured in image sizes. Generally, at least one of the corresponding variances should be non-zero; otherwise all the point sources coincide (some interesting patterns can be still generated with varying frequency though).

The simulation implements a hybrid non-equilibrium Ising model [1], combining a discrete short-scale discrete Ising model with continuous slow inhibitor.

The discrete variable u has two possible values, between which it can flip probabilistically with probability

where ΔE is the change of energy
resulting from flipping and T is the
temperature. The energy is given by the number of neighbours in the
opposite state in the directions along the coordinate axes
n_{o},
the number of neighbours in the opposite state in the directions along
diagonals
n_{d}
and also by bias caused by the inhibitor field
v:

The continuous inhibitor field v is governed by a local differential equation coupled to the variable u:

where μ is the inhibitor coupling and ν is the bias parameter. The boundary conditions of the simulation are periodic, hence, the generated images are also periodic (i.e. perfectly tilable).

The calculation has the following parameters:

- Number of iterations
One iteration consists of four steps: A Monte Carlo update of u, a time step of solution of the differential equation for v, another Monte Carlo step and another differential euqation time step. The values of v shown correspond to the second update. The quantity shown as u is the average from the two values surrounding in time the corresponding value of v. Hence the images of u are three-valued, not two-valued.

- Temperature T
Temperature determines the probability with which the two-state variable u can flip to the other value if it results in a configurations with higher energy or similar (flips that lower the energy a lot occur unconditonally). A larger temperature means less separation between the two u domains.

- Inhibitor strength B
Strength with which the continuous variable biases the energy of each pixel. For large values the inhibitor has larger influence compared to the surface tension.

- Inhibitor coupling μ
Coupling factor between u and v in the differential equation for v.

- Bias ν
Bias in the differential equation for v towards larger or smaller values.

- Monte Carlo time step
Time step in the differential equation corresponding to one Monte Carlo step. So this parameter determines the relative speed of the two processes.

- Height
Range of values of the created images.

The simulation implements a Monte Carlo discrete diffusion limited aggregation model. Pixel-shaped particles fall onto the surface and move around it until they stick to a cluster, slowly forming a monolayer. The flux of incoming particles is low so that only a few particles are free to move at any given time and the particles can travel a considerable distance on the surface before sticking. For typical parameter values, this leads to the formation of “fractal flake” clusters.

The calculation has the following parameters:

- Coverage
The average number of times a particle falls onto any given pixel. Coverage value of 1 means the surface would be covered by a monolayer, assuming the particles cover it uniformly.

- Flux
The average number particles falling onto any given pixel per simulation step. Smaller values of flux lead to larger structures as the particles diffuse for longer time before they meet another particle. The value is given as a decimal logarithm, indicated by the units log₁₀.

- Height
The height of one particle which gives the height of the steps in the resulting image.

- Sticking probability
The probability that a free particle will finally stick and stop moving when it touches another single particle. Probabilities that the particle will stick if it touches two or three particles increase progressively depending on this value. The sticking probability is always zero for a particle with no neighbours and always one for a particle with all four neighbours.

- Activation probability
The probability a particle that has not stuck will move if it touches another particle. The probability for more touching particles decreases as a power of the single-particle probability. Particles without any neighbours can always move freely.

- Passing Schwoebel probability
A particle that has fallen on the top of an already formed cluster can have reduced probability to descend to the lower layer due to so called Schwoebel barrier. If this parameter is 1 there is no such barrier, i.e. particles can descend freely. Conversely, probability 0 means particles can never descend to the lower layer. The value is given as a decimal logarithm, indicated by the units log₁₀.

Note that some parameter combinations, namely very small flux combined with very small Schwoebel barrier passing probability, can lead to excessively long simulation times.

The lattice synthesis module creates surfaces based on randomised two-dimensional lattices. It has two major parts. The first part, controlled by parameters in tab Lattice, is the creation of a set of points in plane that are organised to a more or less randomised lattice. The second part, controlled by parameters in tab Surface, is the actual construction of a surface based on quantities calculated from Voronoi tessellation and/or Delaunay triangulation of the set of points.

The creation of the lattice has the following parameters:

- Lattice
The base lattice type. The random lattice corresponds to completely randomly placed points. Other types (square, hexagonal, triangular) correspond to regular organisations of points.

- Size
The average cell size. More precisely, this parameter describes the mean point density. It is equal to the side of the square if the same number of points was organised to a square lattice.

- Lattice relaxation
Amount to which the lattice is allowed to relax. The relaxation process pushes points away from very close neighbours and towards large empty space. The net result is that cell sizes become more uniform. Of course, relaxation has no effect on regular lattices. It should be noted that relaxation requires progressive retessellation and large relaxation parameter values can slow down the surface generation considerably.

- Height relaxation
Amount to which the random values assigned to each point (see below) are allowed to relax. The relaxation process is similar to diffusion and leads to overal smoothing of the random values.

- Orientation
The rotation of the lattice with respect to some base orientation, measured counterclockwise. It is only available for regular lattices as the random lattice is isotropic.

- Amplitude, Lateral scale
Parameters that control the lattice deformation. They have the same meaning as in Pattern synthesis.

The final surface is constructed as a weighted sum of a subset of basic quantities derived from the Voronoi tessellation or Delaunay triangulation. Each quantity can be enabled and disabled. When it is selected in the list, its weight in the sum and its thresholding parameters can be modified using the sliders. The lower and upper threshold cut the value range (which is always normalised to [0, 1]) by changing all values larger than the upper threshold equal to the thresold value and similarly for the lower thresold.

Some of the basic quantities are calculated from lateral coordinates only. Some, however, are calculated from random values (“heights”) assigned to each point in the set. The available quantities include:

- Random constant
Rounding interpolation between the random values assigned to each point of the set. This means each Voronoi cell is filled with a constant random value.

- Random linear
Linear interpolation between the random values assigned to each point of the set. Thus the surface is continuous, with each Delaunay triangle corresponding to a facet.

- Random bumpy
An interpolation similar to the previous one, but non-linear, creating relatively level areas around each point of the set.

- Radial distance
Distance to the closest point of the set.

- Segmented distance
Distance to the closest Voronoi cell border, scaled in each cell segment so that the set point is in the same distance from all borders.

- Segmented random
The same quantity as segmented distance, but multiplied by the radndom value assigned to the point of the set.

- Border distance
Distance to the closest Voronoi cell border.

- Border random
The same quantity as border distance, but multiplied by the radndom value assigned to the point of the set.

- Second nearest distance
Distance to the second nearest point of the set.

The module generates, among other things, surfaces with profiles similar to samples of fractional Brownian motion. The construction method is, however, not very sophisticated. Starting from corners of the image, interior points are recursively linearly interpolated along the horizontal and vertical axes, adding noise that scales with distance according to the given Hurst exponent. Some of the surfaces are essentially the same as those generated using spectral synthesis, however, constructing them in the direct space instead of frequency space allows different modifications of their properties.

The generator has the following parameters:

- Hurst exponent
The design Hurst exponent H. For the normal values between 0 and 1, the square root of height-height correlation function grows as H-th power of the distance. The construction algorithm permits formally even negative values beause it stops at the finite resolution of one pixel.

- Stationarity scale
Scale at which stationarity is enforced (note Fractional Brownian motion is not a stationary). When this scale is comparable to the image size or larger, it has little effect. However, when it is small the image becomes “homogeneised” instead of self-similar above this scale.

- Distribution
Distribution of the noise added during the generation. Uniform and Gaussian result in essentially the same surfaces (statistically); the former is faster though. More heavy-tailed distributions, i.e. exponential and especially power, lead to prominent peaks and valleys.

- Power
Power α for the power distribution. The probability density function is proportional to

- RMS
The root mean square value of the heights (or of the differences from the mean plane which, however, always is the z = 0 plane). Note this value applies to the specific generated image, not the process as such, which does not have finite RMS. Button Like Current Channel sets the RMS value to that of the current channel.