<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKVoronoiNoiseSource/init(frequency:displacement:distanceEnabled:seed:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKVoronoiNoiseSource(im)initWithFrequency:displacement:distanceEnabled:seed:"
  },
  "title" : "init(frequency:displacement:distanceEnabled:seed:)"
}
-->

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

Initializes a Voronoi noise source with the specified parameters.

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

## Parameters

`frequency`

The initial value for the [`frequency`](/documentation/GameplayKit/GKVoronoiNoiseSource/frequency) property, which determines the number and spacing of cells in generated noise.

`displacement`

The initial value for the [`displacement`](/documentation/GameplayKit/GKVoronoiNoiseSource/displacement) property, which determines the variety of noise values between cells in generated noise.

`distanceEnabled`

The initial value for the [`isDistanceEnabled`](/documentation/GameplayKit/GKVoronoiNoiseSource/isDistanceEnabled) property, which determines whether to add distance values to generated noise.

`seed`

The initial value for the [`seed`](/documentation/GameplayKit/GKVoronoiNoiseSource/seed) property, which determines the overall structure of generated noise.

## Return Value

A new noise source.

## Discussion

To make use of this noise source, create a [`GKNoise`](/documentation/GameplayKit/GKNoise) object from it (and optionally apply operations to that noise object or combine it with other noise objects). Then create a [`GKNoiseMap`](/documentation/GameplayKit/GKNoiseMap) object from your noise object, generating a concrete field of values that you can sample from directly or visualize using the <doc://com.apple.documentation/documentation/SpriteKit/SKTexture> or `SKTileMap` class.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)