Class

GKSpheresNoiseSource

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

Declaration

class GKSpheresNoiseSource : GKNoiseSource

Overview

All noise sources generate infinite 3D fields of noise values, but this fact is especially relevant to sphere noise: by transforming a noise object in 3D, you can sample the noise in ways that “slice” through the spheres. Use this technique (combined with other noise sources and noise processing operations) to create effects such as wood-grain textures.

Figure 1

Example output from a sphere noise source

Like all GKNoiseSource subclasses, a sphere 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

init(frequency: Double)

Initializes a sphere noise source with the specified frequency.

class func spheresNoise(withFrequency: Double) -> Self

Creates a sphere noise source with the specified frequency.

Managing Noise Generation Parameters

var frequency: Double

A value that determines the size and spacing of concentric spheres.

Relationships

Inherits From

Conforms To

See Also

Procedural Noise

class GKNoiseSource

The abstract superclass for procedural noise generators.

class GKNoise

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

class GKNoiseMap

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

class GKCoherentNoiseSource

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

class GKBillowNoiseSource

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

class GKPerlinNoiseSource

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

class GKRidgedNoiseSource

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

class GKVoronoiNoiseSource

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

class GKCylindersNoiseSource

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

class GKCheckerboardNoiseSource

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

class GKConstantNoiseSource

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software