Git Product home page Git Product logo

noise-rs's Introduction

Github Link CI Status Documentation Version MSRV


Noise-rs

Procedural Noise Generation library for Rust
Explore the docs »

Report Bug - Request Feature

[dependencies]
noise = "0.8"

About The Project

Noise-rs is a Rust library to generate smoothly varying noise for textural use and graphical display.

Noise generators are contained in NoiseFn modules, and can be combined to make very complex noise results.

Planetary Surface Example

planet surface image planet surface 4x planet surface 16x

Gradient Noise

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

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.

Usage

To use the function write_to_file you have to set the feature "images" in the Cargo.toml

[dependencies]
noise = { version = "0.8.2", features = ["images"] }
use noise::{Fbm, Perlin};
use noise::utils::{NoiseMapBuilder, PlaneMapBuilder};

fn main() {
  let fbm = Fbm::<Perlin>::new(0);

  PlaneMapBuilder::<_, 2>::new(&fbm)
          .set_size(1000, 1000)
          .set_x_bounds(-5.0, 5.0)
          .set_y_bounds(-5.0, 5.0)
          .build()
          .write_to_file("fbm.png");
}

FBM Noise

For more examples, refer to the Examples

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

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

License

Licensed under either of

at your option.

Contact

Project Link: https://github.com/razaekel/noise-rs

noise-rs's People

Contributors

razaekel avatar brendanzab avatar cifram avatar amaranth avatar emberian avatar phoenixenero avatar bfops avatar jeffreyrosenbluth avatar adudney avatar sortekanin avatar rlane avatar benwiederhake avatar aatch avatar jonas-schievink avatar bvssvni avatar hollinwilkins avatar ameobea avatar bsurmanski avatar mystise avatar vallentin avatar tomaka avatar tioover avatar est31 avatar arturoc avatar andystanton avatar tyoverby avatar pnevyk avatar coolreader18 avatar h4kor avatar jpsikstus 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.