Metadata-Version: 2.4
Name: rumore
Version: 0.1.4
Summary: A numpy-based noise generator
Author: Daniel Berio
License: MIT License
        
        Copyright (c) 2025 colormotor
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/colormotor/rumore
Project-URL: Issues, https://github.com/colormotor/rumore/issues
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Dynamic: license-file


# Table of Contents

1.  [Vectorized value & gradient noise with NumPy](#orgc95d43d)
    1.  [Install with PIP](#org1a29ee9)
    2.  [Install locally](#org5baced4)
    3.  [Examples](#org11dbf3d)



<a id="orgc95d43d"></a>

# Vectorized value & gradient noise with NumPy

Rumore is a lightweight Python library for procedural noise. It provides **value noise** and **gradient noise** in **1D/2D/3D** plus **octave summation** of these (fractal Brownian motion, fBm).

The library does not implement Ken Perlin’s original algorithm directly, but its gradient noise produces visually similar results.


<a id="org1a29ee9"></a>

## Install with PIP

    pip install rumore


<a id="org5baced4"></a>

## Install locally

Clone the repo, navigate to the directory and from there

    pip install -e .


<a id="org11dbf3d"></a>

## Examples

Import necessary stuff

    from importlib import reload
    import matplotlib.pyplot as plt
    import numpy as np
    import rumore

Generate some 1d gradient noise with different number of octaves

    reload(rumore)
    x = np.linspace(-10, 10, 200)
    plt.figure(figsize=(5,4))
    for i in range(1, 8):
        plt.plot(x, rumore.grad_noise(x, octaves=i))
    plt.show()

![img](https://raw.githubusercontent.com/colormotor/rumore/main/figures/1d.png)

Perturb points along a circle with 2d noise

    t = np.linspace(0, np.pi*2, 200)
    x = np.cos(t)
    y = np.sin(t)
    r = rumore.grad_noise(x, y)*0.5+0.5
    plt.figure(figsize=(4,4))
    plt.plot(x*r, y*r)
    plt.show()

![img](figures/2d.png)

Generate a grid of 2d noise value (a grayscale image)

    reload(rumore)
    x = np.linspace(0, 5, 300)
    y = np.linspace(0, 3, 100)
    img = rumore.noise_grid(x, y)
    plt.imshow(img)
    plt.show()

![img](figures/2d_grid.png)

