class Noise
- Noise
- Reference
- Object
Overview
Module for generating n dimensions perlin like noise
Direct Known Subclasses
Defined in:
noise.crConstructors
-
.new(periods : Indexable(UInt32 | Nil), frequencies = Slice(Float64 | ::Nil).empty, offsets = Slice(Float64 | ::Nil).empty, intensity_multiplier : Float64 = 1.0, intensity_gain : Float64 = 0.0)
Initialize a periodic noise.
-
.new(frequencies = Slice(Float64 | ::Nil).empty, offsets = Slice(Float64 | ::Nil).empty, intensity_multiplier : Float64 = 1.0, intensity_gain : Float64 = 0.0, child : Noise | Nil = nil)
Initialize a non-periodic noise.
Instance Method Summary
- #*(other : Float64) : Noise
- #*(other : Noise) : Noise
- #+(other : Float64) : Noise
- #+(other : Noise) : Noise
- #+ : Noise
- #-(other : Float64) : Noise
- #-(other : Noise) : Noise
- #- : Noise
- #/(other : Float64) : Noise
- #/(other : Noise) : Noise
- #[](*coordinates : Float64) : Float64
- #gradients(coordinates : Indexable(Int32)) : Indexable(Float64)
-
#interpolate(a0 : Float64, a1 : Float64, w : Float64)
Simple smootherstep interpolation function
-
#raw(*coordinates : Float64)
Generate noise value for the given coordinates and gradients
Constructor Detail
def self.new(periods : Indexable(UInt32 | Nil), frequencies = Slice(Float64 | ::Nil).empty, offsets = Slice(Float64 | ::Nil).empty, intensity_multiplier : Float64 = 1.0, intensity_gain : Float64 = 0.0)
#
Initialize a periodic noise. It must be the root noise to be periodic.
def self.new(frequencies = Slice(Float64 | ::Nil).empty, offsets = Slice(Float64 | ::Nil).empty, intensity_multiplier : Float64 = 1.0, intensity_gain : Float64 = 0.0, child : Noise | Nil = nil)
#
Initialize a non-periodic noise. It can be a root noise ot just parameters added on top of another noise.
Instance Method Detail
Simple smootherstep interpolation function
Generate noise value for the given coordinates and gradients