# `Isotope.Utils`
[🔗](https://codeberg.org/sickday/Isotope118/src/branch/main/lib/utils.ex#L1)

Utility functions for working with noise maps.

## Visualization

    {:ok, noise} = Isotope.Noise.new(%Isotope.Options{seed: 42})
    nm = Isotope.Noise.noise_map(noise, {80, 40})
    Isotope.Utils.show_noisemap(nm)

This renders the noise map to the terminal using ANSI 256-color codes.
Each value is mapped to a color index and displayed as a `▒` character.
Requires a terminal with ANSI color support.

# `show_noisemap`

```elixir
@spec show_noisemap(Isotope.NoiseMap.t()) :: :ok
```

Shows the given noise map on the stdout using ANSI color codes.
> This won't work if your terminal doesn't support ANSI color codes.

```elixir
{:ok, noise} = Isotope.Noise.new()
noise |> Isotope.Noise.noise_map({50, 50})
      |> Isotope.Utils.show_noisemap()
# Outputs noise visualization
:ok
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
