# Uniformly Distributed Perlin Noise

**URL:** <https://discourse.processing.org/t/uniformly-distributed-perlin-noise/31768>\
**Category:** Gallery\
**Created:** [August 17, 2021, 6:50pm UTC](https://discourse.processing.org/t/uniformly-distributed-perlin-noise/31768 "2021-08-17T18:50:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [August 25, 2021, 2:10pm UTC](https://discourse.processing.org/t/uniformly-distributed-perlin-noise/31768/3 "2021-08-25T14:10:23Z")

</div>

I thought I would compare JRubyArt noise (derived from [KdotJPG OpenSimplex2](https://github.com/KdotJPG/OpenSimplex2)) to see how that would fare, here is the test code:-

```ruby
load_library :uniform_noise

java_import 'micycle.uniformnoise.UniformNoise'
java_import 'java.awt.Color'

OCTAVES = 4

def setup
  sketch_title 'Uniform Noise Test'
  load_pixels
  @unoise = UniformNoise.new
end

def draw
  grid(width, height) do |x, y|
    val = if x < width / 2
            (noise(x * 0.015, y * 0.015, frame_count * 0.035) + 1) / 2
          else
            @unoise.uniform_noise(x * 0.0085, y * 0.0085, frame_count * 0.01, OCTAVES, 0.5)
          end
    col = Color.HSBtoRGB(val, 1, 1)
    pixels[y * width + x] = col
  end
  update_pixels
end

def settings
  size(800, 800)
end

```

Here is the result

 ![noise_test](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f2e523b33c0c67e07b359227327d07a6a1b59791.jpeg)

The uniform noise is clearly the winner here, but OpenSimplex2 is an improvement over the processing “perlin noise”. There is even a variation that is more suitable for creating terrains.

---

_[View the full topic](https://discourse.processing.org/t/uniformly-distributed-perlin-noise/31768)._
