GithubHelp home page GithubHelp logo

atul9 / noise-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from razaekel/noise-rs

0.0 2.0 0.0 743 KB

Procedural noise generation library for Rust.

License: Apache License 2.0

Rust 100.00%

noise-rs's Introduction

noise-rs

Build Status Documentation Crates.io

A procedural noise generation library for Rust.

Documentation

use noise::noise_fns::Fbm;

let fbm = Fbm::new();

let val = fbm.get([42.0, 37.0, 2.0]);

API

Gradient Noise

Gradient noise produces a smooth, continuous value over space. It's achieved by dividing space into regions, and placing a random gradient at each vertex, then blending between those gradients.

Perlin noise

A very fast and reasonable quality gradient noise:

  • Perlin::new()

OpenSimplex noise

A slower but higher quality form of gradient noise:

  • OpenSimplex::new()

Value Noise

Value noise (sometimes mistaken with gradient noise) produces lower quality smooth noise. It exhibits pronounced grid artifacts, but can be slightly faster than gradient noise. Benchmarks show it's about 1.2โ€“1.3ร— faster than Perlin noise.

Cell neighbours are blended using a weighted S-curve linear interpolation method. This removes any discontinuities across grid edges.

  • Value::new()

Fractional Brownian Motion

A way of combining multiple octaves of a noise function to create a richer and more varied output:

  • Fbm::new()

Worley Noise

Named after Steven Worley, and also called Voronoi noise, is based on dividing space into cells based on proximity to a random set of seed points.

  • Worley::new()

Noise Functions

These are the actual noise functions, which just take a coordinate using get() and return a value. They can be chained together when declared, creating very complex noise results.

See the individual function pages for their descriptions, and the examples for their usage.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

noise-rs's People

Contributors

aatch avatar adudney avatar amaranth avatar ameobea avatar andystanton avatar arturoc avatar benwiederhake avatar bfops avatar brendanzab avatar bvssvni avatar cifram avatar csherratt avatar emberian avatar jeffparsons avatar jonas-schievink avatar kvark avatar mtsr avatar mystise avatar phoenixenero avatar ralith avatar razaekel avatar rlane avatar tioover avatar tomaka avatar tyoverby avatar

Watchers

 avatar  avatar

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.