Random distribution of points based on Perlin Noise?

677 Views Asked by At

Is there a good way to generate a random point in a 2D plane where the probability of choosing any specific location is based on Perlin Noise?

Essentially, when I generate a lot of points using such a method I would like to see many points in the areas where the Noise has high values and not so many in those where the value is lower.

Any ideas?

1

There are 1 best solutions below

2
On BEST ANSWER

Simple rejection-based approach:

  1. Generate random point
  2. Calculate Perlin noise value greater than or equal to 0 and less than or equal to 1 at point
  3. Generate random number greater than 0 and less than or equal to 1
  4. If random number is greater than Perlin noise value then discard point and go back to step 1 and try again, otherwise that's your point