amithm3 / nPerlinNoise

A robust open source implementation of Perlin Noise Algorithm for N-Dimensions in Python
https://pypi.org/project/nPerlinNoise/
MIT License
21 stars 2 forks source link
contributions-welcome hacktoberfest hacktoberfest-accepted n-dimensional noise noise-algorithms noise-generator numpy-noise numpy-perlin open-source performance perlin perlin-noise python reactjs

LICENSE GitHub last commit PyPI GitHub release (latest by date) GitHub release (latest by date including pre-releases) PyPI - Python Version PyPI - Wheel

forthebadge forthebadge forthebadge forthebadge forthebadge

nPerlinNoise

indexed on PyPI - nPerlinNoise

repo on GitHub - nPerlinNoise

docs on ReadTheDocs -

A robust open source implementation of Perlin Noise Algorithm for N-Dimensions in Python.

Details:


Screenshots:

![](snaps/img_587383161.png) ![](snaps/img_1410614909.png) ![](snaps/img_1742083597.png) ![](snaps/img_2580891136.png) ![](snaps/img_3001325707.png) ![](snaps/img_3403505649.png) ![](snaps/img_4183221855.png) ![](snaps/img_4237425687.png) ![](snaps/img_4246716738.png) ![example2](https://user-images.githubusercontent.com/75326634/196452679-7bcf8b50-357d-409f-9485-8b9fdffd86f0.gif)

Dependencies

for production dependencies see Requirements
for development dependencies see Dev-Requirements

Installation

$ pip install nPerlinNoise

for detailed instruction on installation see INSTALLATION.

Usage

Setup

Note: if the package is not being imported, try import NPerlinNoise as nPN refer #24

>>> import nPerlinNoise as nPN
>>> noise = nPN.Noise(seed=69420)

Basic usage

Get noise values at given n-dimensional coordinates by calling noise(...),
coordinates can be single value, or an iterable

noise(..., l, m, n, ...) has same values with trailing dimensions having zero as coordinate

grid mode allows for computing noise for every combination of coords
use noise(..., gridMode=True) gridMode is key-word only argument, default=False
the output will be of shape equal to the length(s) of coords in that order

for detailed usage see EXAMPLE

API

How to test the software

to see all tests see Tests

Known issues

Getting help

If you have questions, concerns, bug reports, etc. please file an issue in this repository's Issue Tracker or open a discussion in this repository's Discussion section.

Getting involved

General instructions on how to contribute CONTRIBUTING and CODE OF CONDUCT


Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

Credits and references

  1. Inspired from The Coding Train -> perlin noise
  2. hash function by xxhash inspired the rand3 algo and ultimately helped for O(1) time complexity n-dimensional random generator NPrng
  3. StackOverflow for helping on various occasions throughout the development
  4. vnoise and opensimplex for ideas for README.md
  5. docs derivative from open-source-project-template
  6. packaging help from realpython

Maintainer:

Amith M
Instagram

Contributors:

Shravan Revanna
Instagram