Instance Method

move(by:)

Translates the entire noise field by the specified x, y, and z offsets.

Declaration

func move(by delta: vector_double3)

Parameters

delta

A vector whose x, y, and z components each provide a translation offset for the corresponding axis in the noise field.

Discussion

A noise field is inherently three-dimensional and infinite in extent; when you create a GKNoiseMap object from a noise object, the resulting array of noise values is a “slice” of the noise field (through its z = 0 plane, with a specified size and position). By translating, rotating, and scaling the noise field in 3D before you create a noise map, you can create interesting effects. For example, by applying a series of translations along the z-axis to noise generated by a GKPerlinNoiseSource object, you can generate a series of texture images for creating an animated billowing clouds effect.

Figure 1

Example result of the move operation

See Also

Applying Geometric Transformations

func rotate(by: vector_double3)

Rotates the entire noise field by the specified x, y, and z angles.

func scale(by: vector_double3)

Scales the entire noise field by the specified x, y, and z factors.