# NoiseNode

Artifact: [androidx.ink:ink-brush](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/brush/behavior/NoiseNode.kt+class:androidx.ink.brush.behavior.NoiseNode) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***

Common/All
- Cmn

  ```
  class NoiseNode : ValueNode
  ```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node) |||
|   | ↳ | [androidx.ink.brush.behavior.ValueNode](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ValueNode) ||
|   |   | ↳ | [androidx.ink.brush.behavior.NoiseNode](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode) |

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ValueNode` that produces a smooth random function.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#NoiseNode(kotlin.Int,androidx.ink.brush.behavior.ProgressDomain,kotlin.Float)(seed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, varyOver: https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ProgressDomain, basePeriod: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode` that produces a random variation. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#basePeriod()` The base period of the random function. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#seed()` The seed for the random number generator. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ProgressDomain` | `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#varyOver()` The source of the varying over which the random function is evaluated. | Cmn |

### Inherited functions

From [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node) `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node#calculateMinimumRequiredVersion()()`

Returns the minimum required `https://developer.android.com/reference/kotlin/androidx/ink/brush/Version` for this `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node`.
Cmn

### Inherited properties

From [androidx.ink.brush.behavior.Node](https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ValueNode>` `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/Node#inputs()`

The ordered list of inputs that this node directly depends on.
Cmn

## Public constructors

### NoiseNode

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
NoiseNode(seed: Int, varyOver: ProgressDomain, basePeriod: Float)
```

Creates a `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode` that produces a random variation.

A new random value between 0 and 1 will be generated every `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#(kotlin.Int,androidx.ink.brush.behavior.ProgressDomain,kotlin.Float)` units along the `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#(kotlin.Int,androidx.ink.brush.behavior.ProgressDomain,kotlin.Float)` domain, with the output of this node shifting smoothly between successive random values.

If `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/NoiseNode#(kotlin.Int,androidx.ink.brush.behavior.ProgressDomain,kotlin.Float)` is `https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ProgressDomain#DISTANCE_IN_CENTIMETERS()` and the stroke input data does not indicate the relationship between stroke units and physical units (e.g. as may be the case for programmatically-generated inputs), then the output value will be null.

| Parameters |
|---|---|
| `seed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the seed for the random number generator |
| `varyOver: https://developer.android.com/reference/kotlin/androidx/ink/brush/behavior/ProgressDomain` | the source of the varying over which the random function is evaluated |
| `basePeriod: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the base period of the random function |

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### basePeriod

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
val basePeriod: Float
```

The base period of the random function.

### seed

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
val seed: Int
```

The seed for the random number generator.

### varyOver

Cmn Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
val varyOver: ProgressDomain
```

The source of the varying over which the random function is evaluated.