Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Step-by-step description of Perlin Noise #7

Open
felix91gr opened this issue Jun 26, 2018 · 1 comment
Open

Step-by-step description of Perlin Noise #7

felix91gr opened this issue Jun 26, 2018 · 1 comment

Comments

@felix91gr
Copy link
Owner

This is important to keep track of exactly what we need to implement.

Perlin Noise

Description

  • Input: an N-D vector v. Properties:
    • N dimensional, vector of real numbers
    • All coordinates have a well-defined value (not NaN or infinity, for example)
  • Output: a value of noise f(v) for that vector. Properties:
    • 1-dimensional, real number
    • Value sits between 0 and 1
    • Function f is continuous
    • Its derivative is continuous as well. Is the second derivative continuous? I don't quite know 🤔
    • f(v) is deterministic: its value doesn't change if the state of the program changes.
    • f(v) appears to be random for v: ideally, v can't be found from f(v), and f(v+x) is unpredictable for large x.
    • f(v) is isotropic: it has no discernible directional patterns. Might not hold for Perlin. It does hold for Simplex, though.
    • f(v) has no discernible aliasing.

Step-by-Step

  1. Find hypercube that contains v.
    • Smallest corner: v.floor().
    • Largest corner: v.ceil().
  2. For each of the 2n corners in the hypercube, calculate their pseudorandom gradient.
  3. For each corner ci, with gradient gido:
    • u = v - ci
    • ni = u * gi
  4. For each value of ni, interpolate using a fifth degree polynomial (or a Hermite blending function).
  5. (alternative to 4): interpolate as it is done in the Simplex function. This reduces computational complexity.

The result of 4 (or 5) is f(v).

@felix91gr
Copy link
Owner Author

Every step seems to be described in our Perlin Noise project, so I think we're good.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant