simplex

package
v0.0.0-...-93368d4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Simplex noise in 2D, 3D and 4D. Useful for world generation.

Many, many, many thanks to Stefan Gustavson (stegu@itn.liu.se) and optimisations made by Peter Eastman (peastman@drizzle.stanford.edu).

Sources: http://webstaff.itn.liu.se/~stegu76/ http://webstaff.itn.liu.se/~stegu76/simplexnoise/simplexnoise.pdf http://webstaff.itn.liu.se/~stegu76/simplexnoise/SimplexNoise.java

Index

Constants

This section is empty.

Variables

View Source
var (
	F4 float64 = (math.Sqrt(5.0) - 1.0) / 4.0
	G4 float64 = (5.0 - math.Sqrt(5.0)) / 20.0
)

Skewing and unskewing factors for 2, 3, and 4 dimensions

Functions

func At2d

func At2d(x, y float64) float64

At2d computes 2D simplex noise.

func At3d

func At3d(x, y, z float64) float64

At3d computes 3D simplex noise.

func At4d

func At4d(x, y, z, w float64) float64

At4d computes 4D simplex noise.

func MultiAt2d

func MultiAt2d(oct int, p, f, x, y float64) float64

MultiAt2d computes 2D Multi-Octave Simplex noise. For each octave, a higher frequency/lower amplitude function will be added to the original. The higher the persistence [0, 1], the more of each succeeding octave will be added.

func MultiAt3d

func MultiAt3d(oct int, p, f, x, y, z float64) float64

MultiAt3d computes 3D Multi-Octave Simplex noise. For each octave, a higher frequency/lower amplitude function will be added to the original. The higher the persistence [0, 1], the more of each succeeding octave will be added.

func MultiAt4d

func MultiAt4d(oct int, p, f, x, y, z, w float64) float64

MultiAt4d computes 4D Multi-Octave Simplex noise. For each octave, a higher frequency/lower amplitude function will be added to the original. The higher the persistence [0, 1], the more of each succeeding octave will be added.

Types

This section is empty.

Jump to

Keyboard shortcuts

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