Giter Club home page Giter Club logo

rust-noisetoys's People

Contributors

felix91gr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

rust-noisetoys's Issues

Step-by-step description of Perlin Noise

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.