NoiseGo
Implementation of Improved Perlin Noise in Golang.
Preview
![](https://user-images.githubusercontent.com/69315285/150670142-3a5530cf-30f3-4dd7-9d34-36e9aec0c988.png)
Usage
import(
"github.com/TadaTeruki/NoiseGo/v2/noise"
)
func main(){
// noise.New(seed int64, maxValue uint64) noise.Noise
// - Initialize noise generator
// maxValue : maximum coordinate value
nz := noise.New(255)
// noise.Get(x, y float64) float64
// - Get noise value with coordinate(x, y)
r1 := nz.Get(200.2, 81.4)
// noise.GetOctaved(x, y float64, octaves int, persistence float64) float64
// - Get octaved noise value with coordinate(x, y) and parameters(octaves, persistence)
r2 := nz.GetOctaved(200.2, 81.4, 10, 0.5)
}
maxValue = 30 |
maxValue = 3 |
![](https://user-images.githubusercontent.com/69315285/150671923-ce22fbfd-6397-456f-bedc-d9823f9a6bf9.png) |
![](https://user-images.githubusercontent.com/69315285/150671993-3256f67b-be14-4a1c-bc5f-9dffcce59e50.png) |
Installation
$ go get -u github.com/TadaTeruki/NoiseGo/v2