---
title: "init(frequency:displacement:distanceEnabled:seed:)"
framework: gameplaykit
role: symbol
role_heading: Initializer
path: "gameplaykit/gkvoronoinoisesource/init(frequency:displacement:distanceenabled:seed:)"
---

# init(frequency:displacement:distanceEnabled:seed:)

Initializes a Voronoi noise source with the specified parameters.

## Declaration

```swift
init(frequency: Double, displacement: Double, distanceEnabled: Bool, seed: Int32)
```

## Parameters

- `frequency`: The initial value for the doc://com.apple.gameplaykit/documentation/GameplayKit/GKVoronoiNoiseSource/frequency property, which determines the number and spacing of cells in generated noise.
- `displacement`: The initial value for the doc://com.apple.gameplaykit/documentation/GameplayKit/GKVoronoiNoiseSource/displacement property, which determines the variety of noise values between cells in generated noise.
- `distanceEnabled`: The initial value for the doc://com.apple.gameplaykit/documentation/GameplayKit/GKVoronoiNoiseSource/isDistanceEnabled property, which determines whether to add distance values to generated noise.
- `seed`: The initial value for the doc://com.apple.gameplaykit/documentation/GameplayKit/GKVoronoiNoiseSource/seed property, which determines the overall structure of generated noise.

## Return Value

Return Value A new noise source.

## Discussion

Discussion To make use of this noise source, create a 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.

## See Also

### Creating a Noise Source

- [voronoiNoise(withFrequency:displacement:distanceEnabled:seed:)](gameplaykit/gkvoronoinoisesource/voronoinoise(withfrequency:displacement:distanceenabled:seed:).md)
