Class

GKVoronoiNoiseSource

A procedural noise generator whose output (also called Worley noise or cellular noise) divides space into discrete cells surrounding random seed points.

Declaration

@interface GKVoronoiNoiseSource : GKNoiseSource

Overview

Voronoi noise can generate textures resembling natural phenomena such as crystalline structures, cracked mud, or star fields.

Figure 1

Example output from a Voronoi noise source

Like all GKNoiseSource subclasses, a Voronoi noise source represents a noise generation algorithm and its parameters. To make use of a noise source, first create GKNoise object from it (and optionally apply operations to that noise object or combine it with other noise objects). Then create a GKNoiseMap object from your noise object, generating a concrete field of values that you can sample from directly or visualize using the SKTexture or SKTileMap class.

Topics

Creating a Noise Source

- initWithFrequency:displacement:distanceEnabled:seed:

Initializes a Voronoi noise source with the specified parameters.

+ voronoiNoiseWithFrequency:displacement:distanceEnabled:seed:

Creates a Voronoi noise source with the specified parameters.

Managing Noise Generation Parameters

frequency

A value that determines the number and size of cells in generated noise.

displacement

The range of random values to assign to each cell in generated noise.

distanceEnabled

A Boolean value that specifies whether generated noise values incorporate the distance from each point to the nearest seed point.

seed

The value that determines the specific configuration of noise produced by the noise source.

Relationships

Inherits From

See Also

Procedural Noise

GKNoiseSource

The abstract superclass for procedural noise generators.

GKNoise

A representation of procedural noise, generated by a noise source, that you can use to process, transform, or combine noise.

GKNoiseMap

A sample of procedural noise data from which you can read noise values directly or create noise textures.

GKCoherentNoiseSource

The abstract superclass for procedural noise generators that create coherent noise.

GKBillowNoiseSource

A procedural noise generator whose output is a type of fractal coherent noise with smooth features.

GKPerlinNoiseSource

A procedural noise generator whose output is a type of fractal coherent noise resembling natural phenomena such as clouds and terrain.

GKRidgedNoiseSource

A procedural noise generator whose output is a type of multifractal coherent noise with sharply defined features.

GKCylindersNoiseSource

A procedural noise generator whose output is a 3D field of concentric cylindrical shells.

GKSpheresNoiseSource

A procedural noise generator whose output is a 3D field of concentric spherical shells.

GKCheckerboardNoiseSource

A procedural noise generator whose output is an alternating square pattern.

GKConstantNoiseSource

A procedural noise generator that outputs a field of a single constant value.