noise

package
v0.0.0-...-bdc3219 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CubicHermite

func CubicHermite(t float64) float64

Cubic Hermite Curve

func Perlin1D

func Perlin1D(x float64) float64

func Perlin2D

func Perlin2D(v vector.Vector2) float64

func QuinticInterpolation

func QuinticInterpolation(t float64) float64

Quintic interpolation curve

Types

type DistanceField

type DistanceField struct {
	// contains filtered or unexported fields
}

func NewDistanceField

func NewDistanceField(xCells, yCells int, size vector.Vector2) *DistanceField

func (DistanceField) Sample

func (df DistanceField) Sample(in vector.Vector2) float64

type Sampler2D

type Sampler2D func(vector.Vector2) float64

type Stack2D

type Stack2D struct {
	// contains filtered or unexported fields
}

func PerlinStack

func PerlinStack(entries []Stack2DEntry) Stack2D

func (Stack2D) Value

func (s2d Stack2D) Value(v vector.Vector2) float64

type Stack2DEntry

type Stack2DEntry struct {
	Scalar    float64
	Amplitude float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL